ref: 2a0570df9492a20aa4236745a844f6e939731e47
parent: 409453a6a1ea693dac7a0e487beb55577ad10869
author: Clownacy <Clownacy@users.noreply.github.com>
date: Tue Apr 7 14:18:45 EDT 2020
Make bugfix consistent with official code
--- a/src/Main.cpp
+++ b/src/Main.cpp
@@ -279,12 +279,18 @@
if (conf.display_mode == 1)
{
if (!StartDirectDraw(hWnd, 0, 0))
+ {
+ ReleaseMutex(hMutex);
return 0;
+ }
}
else
{
if (!StartDirectDraw(hWnd, 1, 0))
+ {
+ ReleaseMutex(hMutex);
return 0;
+ }
}
#else
// Doesn't handle StartDirectDraw failing
@@ -338,7 +344,10 @@
#ifdef FIX_BUGS
if (!StartDirectDraw(hWnd, 2, depth))
+ {
+ ReleaseMutex(hMutex);
return 0;
+ }
#else
// Doesn't handle StartDirectDraw failing
StartDirectDraw(hWnd, 2, depth);