Skip to content

Commit

Permalink
Make ImGuiRedux work standable absense of ImGuiCleo
Browse files Browse the repository at this point in the history
  • Loading branch information
user-grinch committed Nov 4, 2023
1 parent e1ae61d commit 195ac71
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
with:
artifacts: ImGuiRedux${{matrix.platform}}.zip
name: "${{matrix.platform}} Builds"
body: "This release is updated frequently with newer builds.\nImGuiCleo${{matrix.platform}}.cleo for regular CLEO\nImGuiRedux${{matrix.platform}}.cleo for CLEORedux"
body: "This release is updated frequently with newer builds.\n\n- ImGuiCleo${{matrix.platform}}.cleo for regular CLEO\n- ImGuiRedux${{matrix.platform}}.cleo for CLEORedux"
allowUpdates: true
tag: "${{matrix.platform}}-latest"
ImGuiCleo:
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
with:
artifacts: ImGuiCleoWin32.zip
name: "Win32 Builds"
body: "This release is updated frequently with newer builds.\nImGuiCleoWin32.cleo for regular CLEO\nImGuiReduxWin32.cleo for CLEORedux"
body: "This release is updated frequently with newer builds.\n\n-ImGuiCleoWin32.cleo for regular CLEO\n-ImGuiReduxWin32.cleo for CLEORedux"
allowUpdates: true
tag: "Win32-latest"

3 changes: 2 additions & 1 deletion .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
],
"defines": [
"_DEBUG",
"_DX9_SDK_INSTALLED"
"_DX9_SDK_INSTALLED",
"RUNTIME_REDUX"
],
"windowsSdkVersion": "10.0.19041.0",
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe",
Expand Down
10 changes: 9 additions & 1 deletion src/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,16 @@ BOOL WINAPI DllMain(HINSTANCE hDllHandle, DWORD nReason, LPVOID Reserved) {
if (gvm.IsVC()) gGameVer = eGameVer::VC;
if (gvm.IsSA()) gGameVer = eGameVer::SA;
}
#else
#else
if (GetModuleHandle("ImGuiCleoWin32.cleo")) {
Log("ImGuiReduxWin32: ImGuiCleoWin32 detected. Closing...");
return TRUE;
}

auto id = GetHostId();
if (id == HostId::GTA3) gGameVer = eGameVer::III;
if (id == HostId::VC) gGameVer = eGameVer::VC;
if (id == HostId::SA) gGameVer = eGameVer::SA;
if (id == HostId::GTA3_UNREAL) gGameVer = eGameVer::III_DE;
if (id == HostId::VC_UNREAL) gGameVer = eGameVer::VC_DE;
if (id == HostId::SA_UNREAL) gGameVer = eGameVer::SA_DE;
Expand Down

0 comments on commit 195ac71

Please sign in to comment.