This commit is contained in:
恍兮惚兮 2024-11-15 03:34:15 +08:00
parent b63d00ebff
commit 28e069c999
3 changed files with 6 additions and 4 deletions

View File

@ -76,7 +76,6 @@ def build_langx_xp(lang, core):
cmake -DBUILD_PLUGIN=OFF -DWINXP=ON -DLANGUAGE={lang} {flags} ../CMakeLists.txt -G "Visual Studio 16 2019" -A win32 -T v141_xp -B ../build/x86_{lang}_xp cmake -DBUILD_PLUGIN=OFF -DWINXP=ON -DLANGUAGE={lang} {flags} ../CMakeLists.txt -G "Visual Studio 16 2019" -A win32 -T v141_xp -B ../build/x86_{lang}_xp
cmake --build ../build/x86_{lang}_xp --config Release --target ALL_BUILD -j 14 cmake --build ../build/x86_{lang}_xp --config Release --target ALL_BUILD -j 14
call dobuildxp.bat
""" """
) )
os.system(f"cmd /c do.bat") os.system(f"cmd /c do.bat")

View File

@ -223,7 +223,6 @@ def buildPlugins(arch):
cmake -DWINXP=ON ../CMakeLists.txt -G "Visual Studio 16 2019" -A win32 -T v141_xp -B ../build/x86_xp cmake -DWINXP=ON ../CMakeLists.txt -G "Visual Studio 16 2019" -A win32 -T v141_xp -B ../build/x86_xp
cmake --build ../build/x86_xp --config Release --target ALL_BUILD -j 14 cmake --build ../build/x86_xp --config Release --target ALL_BUILD -j 14
call dobuildxp.bat
""" """
) )
os.system(f"cmd /c do.bat") os.system(f"cmd /c do.bat")

View File

@ -27,9 +27,9 @@ DECLARE_API void set_transparent_background(void *m_host)
#endif #endif
} }
#ifndef WINXP
DECLARE_API void put_PreferredColorScheme(void *m_host, COREWEBVIEW2_PREFERRED_COLOR_SCHEME scheme) DECLARE_API void put_PreferredColorScheme(void *m_host, COREWEBVIEW2_PREFERRED_COLOR_SCHEME scheme)
{ {
#ifndef WINXP
wil::com_ptr<ICoreWebView2Controller> m_controller(reinterpret_cast<ICoreWebView2Controller *>(m_host)); wil::com_ptr<ICoreWebView2Controller> m_controller(reinterpret_cast<ICoreWebView2Controller *>(m_host));
wil::com_ptr<ICoreWebView2> coreWebView2; wil::com_ptr<ICoreWebView2> coreWebView2;
[&]() [&]()
@ -44,8 +44,12 @@ DECLARE_API void put_PreferredColorScheme(void *m_host, COREWEBVIEW2_PREFERRED_C
} }
return S_OK; return S_OK;
}(); }();
#endif
} }
#else
DECLARE_API void put_PreferredColorScheme(void *m_host, int scheme)
{
}
#endif
DECLARE_API void *add_ZoomFactorChanged(void *m_host, void (*signal)(double)) DECLARE_API void *add_ZoomFactorChanged(void *m_host, void (*signal)(double))
{ {
#ifndef WINXP #ifndef WINXP