summaryrefslogtreecommitdiffstats
path: root/core/modules/run-virt/winres
diff options
context:
space:
mode:
authorSimon Rettberg2020-08-25 17:30:34 +0200
committerSimon Rettberg2020-08-25 17:30:34 +0200
commit404439848a2d67160c93419bb47cda634c568bfc (patch)
tree164d5c1176ae5649ee39f21ac8ffef0dcd302029 /core/modules/run-virt/winres
parent[dnbd3-proxy-mode] Make cache dir inaccessible to world (diff)
downloadmltk-404439848a2d67160c93419bb47cda634c568bfc.tar.gz
mltk-404439848a2d67160c93419bb47cda634c568bfc.tar.xz
mltk-404439848a2d67160c93419bb47cda634c568bfc.zip
[run-virt] Fix logic bug when handling legacy SetRes call
The hack to fake EAGAIN on multi-screen setups never worked, because we'd exit the switch block before it.
Diffstat (limited to 'core/modules/run-virt/winres')
-rw-r--r--core/modules/run-virt/winres/src/winres.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/modules/run-virt/winres/src/winres.c b/core/modules/run-virt/winres/src/winres.c
index 7020b1a5..d1022acf 100644
--- a/core/modules/run-virt/winres/src/winres.c
+++ b/core/modules/run-virt/winres/src/winres.c
@@ -673,14 +673,13 @@ static int setResolution()
default:
// Legacy WinAPI (single screen only)
ret = setResWinLegacy(res, nres);
- if (ret != ENOTSUP)
- break;
if (ret == 0 && nres > 1 && callCount == 2) {
// Legacy winapi worked, but if we have more than one screen, pretend it failed
// the first time, so maybe one of the methods above will work if we call them again
// (Looking at you, VMwareResolutionSet)
ret = EAGAIN; // Fake failure
}
+ break;
}
return ret;
}