From 404439848a2d67160c93419bb47cda634c568bfc Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 25 Aug 2020 17:30:34 +0200 Subject: [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. --- core/modules/run-virt/winres/src/winres.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'core/modules/run-virt') 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; } -- cgit v1.2.3-55-g7522