diff --git a/UnX/cheat.cpp b/UnX/cheat.cpp index b077c63..6bb94e9 100644 --- a/UnX/cheat.cpp +++ b/UnX/cheat.cpp @@ -27,6 +27,8 @@ #include #include +void UNX_SetSensor (bool state); + enum unx_gametype_t { GAME_INVALID = 0x0, GAME_FFX = 0x01, @@ -634,6 +636,8 @@ unx::CheatManager::Init (void) (LPVOID *)&FFX_LoadLevel_Original); UNX_EnableHook ((LPVOID)((intptr_t)__UNX_base_img_addr + 0x241F60)); + UNX_SetSensor (config.cheat.ffx.permanent_sensor); + SetTimer (unx::window.hwnd, CHEAT_TIMER_FFX, 33, nullptr); } @@ -674,6 +678,15 @@ UNX_ToggleFreeLook (void) (! ffx.debug_flags->control.camera); } +void +UNX_SetSensor (bool state) +{ + config.cheat.ffx.permanent_sensor = state; + + ffx.debug_flags->permanent_sensor = + config.cheat.ffx.permanent_sensor; +} + void UNX_ToggleSensor (void) { @@ -683,8 +696,7 @@ UNX_ToggleSensor (void) config.cheat.ffx.permanent_sensor = (! config.cheat.ffx.permanent_sensor); - ffx.debug_flags->permanent_sensor = - config.cheat.ffx.permanent_sensor; + UNX_SetSensor (config.cheat.ffx.permanent_sensor); } void diff --git a/UnX/config.cpp b/UnX/config.cpp index 484169b..ea025bb 100644 --- a/UnX/config.cpp +++ b/UnX/config.cpp @@ -38,7 +38,7 @@ static unx::INI::File* booster_ini = nullptr; -std::wstring UNX_VER_STR = L"0.5.6"; +std::wstring UNX_VER_STR = L"0.5.6a"; unx_config_s config; typedef bool (WINAPI *SK_DXGI_EnableFlipMode_pfn) (bool); @@ -725,6 +725,11 @@ UNX_LoadConfig (std::wstring name) { sys.version->load (config.system.version); sys.injector->load (config.system.injector); + if (UNX_SetupWindowMgmt ()) { + display.enable_fullscreen->load (config.display.enable_fullscreen); + + SKX_D3D11_EnableFullscreen (config.display.enable_fullscreen); + } if (UNX_SetupLowLevelRender ()) { render.bypass_intel->load (config.render.bypass_intel); @@ -755,13 +760,6 @@ UNX_LoadConfig (std::wstring name) { SK_D3D11_AddTexHash (L"Title.dds", 0xA4FFC068); } - if (UNX_SetupWindowMgmt ()) { - display.enable_fullscreen->load (config.display.enable_fullscreen); - - SKX_D3D11_EnableFullscreen (config.display.enable_fullscreen); - } - - if (empty) return false;