This commit is contained in:
恍兮惚兮 2024-11-15 07:22:23 +08:00
parent 46c535304d
commit 41383c2542
3 changed files with 15 additions and 10 deletions

View File

@ -25,8 +25,8 @@ jobs:
contents: write contents: write
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- run: git submodule init src/plugins/libs/minhook - run: git submodule init cpp/libs/minhook
- run: git submodule update src/plugins/libs/minhook - run: git submodule update cpp/libs/minhook
- uses: GuillaumeFalourd/setup-windows10-sdk-action@v2 - uses: GuillaumeFalourd/setup-windows10-sdk-action@v2
with: with:
sdk-version: 22621 sdk-version: 22621
@ -48,8 +48,8 @@ jobs:
contents: write contents: write
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- run: git submodule init src/plugins/libs/minhook - run: git submodule init cpp/libs/minhook
- run: git submodule update src/plugins/libs/minhook - run: git submodule update cpp/libs/minhook
- uses: GuillaumeFalourd/setup-windows10-sdk-action@v2 - uses: GuillaumeFalourd/setup-windows10-sdk-action@v2
with: with:
sdk-version: 22621 sdk-version: 22621

View File

@ -14,8 +14,8 @@ jobs:
contents: write contents: write
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- run: git submodule init src/plugins/libs/minhook - run: git submodule init cpp/libs/minhook
- run: git submodule update src/plugins/libs/minhook - run: git submodule update cpp/libs/minhook
- uses: GuillaumeFalourd/setup-windows10-sdk-action@v2 - uses: GuillaumeFalourd/setup-windows10-sdk-action@v2
with: with:
sdk-version: 22621 sdk-version: 22621
@ -91,8 +91,8 @@ jobs:
contents: write contents: write
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- run: git submodule init src/plugins/libs/minhook - run: git submodule init cpp/libs/minhook
- run: git submodule update src/plugins/libs/minhook - run: git submodule update cpp/libs/minhook
- uses: GuillaumeFalourd/setup-windows10-sdk-action@v2 - uses: GuillaumeFalourd/setup-windows10-sdk-action@v2
with: with:
sdk-version: 22621 sdk-version: 22621

View File

@ -1,10 +1,10 @@
#ifndef WINXP
static auto LUNA_UPDATE_PREPARED_OK = RegisterWindowMessage(L"LUNA_UPDATE_PREPARED_OK"); static auto LUNA_UPDATE_PREPARED_OK = RegisterWindowMessage(L"LUNA_UPDATE_PREPARED_OK");
static auto WM_MAGPIE_SCALINGCHANGED = RegisterWindowMessage(L"MagpieScalingChanged"); static auto WM_MAGPIE_SCALINGCHANGED = RegisterWindowMessage(L"MagpieScalingChanged");
bool IsColorSchemeChangeMessage(LPARAM lParam) bool IsColorSchemeChangeMessage(LPARAM lParam)
{ {
return lParam && wcscmp(reinterpret_cast<LPCWCH>(lParam), L"ImmersiveColorSet") == 0; return lParam && CompareStringOrdinal(reinterpret_cast<LPCWCH>(lParam), -1, L"ImmersiveColorSet", -1, TRUE) == CSTR_EQUAL;
} }
void globalmessagelistener_1(void *callback) void globalmessagelistener_1(void *callback)
{ {
@ -52,12 +52,17 @@ void globalmessagelistener_1(void *callback)
DispatchMessage(&msg); DispatchMessage(&msg);
} }
} }
#endif
DECLARE_API void globalmessagelistener(void *callback) DECLARE_API void globalmessagelistener(void *callback)
{ {
#ifndef WINXP
std::thread(std::bind(globalmessagelistener_1, callback)).detach(); std::thread(std::bind(globalmessagelistener_1, callback)).detach();
#endif
} }
DECLARE_API void dispatchcloseevent() DECLARE_API void dispatchcloseevent()
{ {
#ifndef WINXP
PostMessage(HWND_BROADCAST, LUNA_UPDATE_PREPARED_OK, 0, 0); PostMessage(HWND_BROADCAST, LUNA_UPDATE_PREPARED_OK, 0, 0);
#endif
} }