Skip to content

Commit

Permalink
chore: fix client build
Browse files Browse the repository at this point in the history
  • Loading branch information
OEOTYAN committed Oct 19, 2024
1 parent ff93ced commit 8c5de90
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions src-client/ll/core/main_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ void leviLaminaMain() {

gui::init();

if (auto res = ::ll::i18n::getInstance().load(getSelfModIns()->getLangDir()); !res) {
if (auto res = i18n::getInstance().load(getSelfModIns()->getLangDir()); !res) {
getLogger().error("i18n load failed");
res.error().log(getLogger());
}

auto& config = getLeviConfig();

if (config.language != "system") {
::ll::i18n::defaultLocaleCode() = config.language;
i18n::defaultLocaleCode() = config.language;
}
CrashLogger::init();

Expand Down Expand Up @@ -116,17 +116,18 @@ LL_AUTO_TYPE_INSTANCE_HOOK(
} // namespace ll

BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ulReasonForCall, LPVOID /*lpReserved*/) {
using namespace ll;
if (ulReasonForCall == DLL_PROCESS_DETACH) {
mod::ModRegistrar::getInstance().releaseAllMods();
}
if (ulReasonForCall != DLL_PROCESS_ATTACH) return TRUE;

::ll::setGamingStatus(::ll::GamingStatus::Default);
setGamingStatus(GamingStatus::Default);
try {
::ll::leviLaminaMain();
leviLaminaMain();
} catch (...) {
::ll::error_utils::printCurrentException(::ll::getLogger());
error_utils::printCurrentException(getLogger());
}
::ll::setGamingStatus(::ll::GamingStatus::Starting);
setGamingStatus(GamingStatus::Starting);
return TRUE;
}
2 changes: 1 addition & 1 deletion src-server/ll/core/main_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void unixSignalHandler(int signum) {
void leviLaminaMain() {
error_utils::initExceptionTranslator();

if (auto res = ::ll::i18n::getInstance().load(getSelfModIns()->getLangDir()); !res) {
if (auto res = i18n::getInstance().load(getSelfModIns()->getLangDir()); !res) {
getLogger().error("i18n load failed");
res.error().log(getLogger());
}
Expand Down
2 changes: 1 addition & 1 deletion src/ll/api/chrono/GameChrono.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ServerClock::time_point ServerClock::now() noexcept {
}

GameTickClock::time_point GameTickClock::now() noexcept {
return ll::service::getLevel().transform([](auto& level) { return fromTick(level.getCurrentTick()); }
return ll::service::getLevel().transform([](auto& level) { return fromTick(level.getCurrentServerTick()); }
).value_or(time_point::min());
}

Expand Down

0 comments on commit 8c5de90

Please sign in to comment.