diff options
author | Simon Rettberg | 2020-09-08 15:34:24 +0200 |
---|---|---|
committer | Simon Rettberg | 2020-09-08 15:34:24 +0200 |
commit | f3c5f7b5825ef9d453b6494fe6c05fb37ea32e11 (patch) | |
tree | 92574f4e576f9852da392784df025488f3d0375a /core | |
parent | [splashtool] Support globbing for --icon mode (diff) | |
download | mltk-f3c5f7b5825ef9d453b6494fe6c05fb37ea32e11.tar.gz mltk-f3c5f7b5825ef9d453b6494fe6c05fb37ea32e11.tar.xz mltk-f3c5f7b5825ef9d453b6494fe6c05fb37ea32e11.zip |
[run-virt] openslx.exe: Fix: Restore WINNT4.0 compatibility
Diffstat (limited to 'core')
-rwxr-xr-x | core/modules/run-virt/data/opt/openslx/vmchooser/data/openslx.exe | bin | 62976 -> 62976 bytes | |||
-rw-r--r-- | core/modules/run-virt/winres/src/winres.c | 14 |
2 files changed, 11 insertions, 3 deletions
diff --git a/core/modules/run-virt/data/opt/openslx/vmchooser/data/openslx.exe b/core/modules/run-virt/data/opt/openslx/vmchooser/data/openslx.exe Binary files differindex d3d8fdb8..d70a8bab 100755 --- a/core/modules/run-virt/data/opt/openslx/vmchooser/data/openslx.exe +++ b/core/modules/run-virt/data/opt/openslx/vmchooser/data/openslx.exe diff --git a/core/modules/run-virt/winres/src/winres.c b/core/modules/run-virt/winres/src/winres.c index d8a0c233..753daad3 100644 --- a/core/modules/run-virt/winres/src/winres.c +++ b/core/modules/run-virt/winres/src/winres.c @@ -610,6 +610,8 @@ static void setPowerState() typedef LONG (WINAPI *CDSTYPE)(LPCWSTR, PDEVMODEW, HWND, DWORD, LPVOID); typedef BOOL (WINAPI *EDDTYPE)(LPCWSTR, DWORD, PDISPLAY_DEVICEW, DWORD); +typedef BOOL (WINAPI *EDMTYPE)(HDC, LPCRECT, MONITORENUMPROC, LPARAM); +typedef BOOL (WINAPI *GMITYPE)(HMONITOR, LPMONITORINFO); struct resolution { long int w, h; @@ -748,8 +750,11 @@ static int isResolutionFine(struct resolution *res, int nres) static BOOL foobar(HMONITOR Arg1, HDC Arg2, LPRECT Arg3, LPARAM Arg4) { + GMITYPE gmi = (GMITYPE)GetProcAddress(hUser32, "GetMonitorInfoW"); + if (gmi == NULL) + return FALSE; MONITORINFOEXW info = { .cbSize = sizeof(info) }; - if (GetMonitorInfoW(Arg1, (LPMONITORINFO)&info) == 0) + if (gmi(Arg1, (LPMONITORINFO)&info) == 0) dalog("MonitorInfo FAILED for %d", (int)Arg1); else { dalog("MonitorInfo for %d:", (int)Arg1); @@ -782,8 +787,11 @@ static int setResWinMulti(struct resolution *res, int nres) BOOL ok = TRUE; dalog("WinAPI multiscreen"); // XXX Debug - EnumDisplayMonitors(NULL, NULL, (MONITORENUMPROC)&foobar, 0); - dalog("End of monitor enum dump"); + EDMTYPE edm = (EDMTYPE)GetProcAddress(hUser32, "EnumDisplayMonitors"); + if (edm != NULL) { + edm(NULL, NULL, (MONITORENUMPROC)&foobar, 0); + dalog("End of monitor enum dump"); + } // XXX END DEBUG DISPLAY_DEVICEW screen = { .cb = sizeof(screen) }; DWORD screenNum = 0; |