21#include "sdl_common_utils.hpp"
25 InitializeCriticalSection(&_section);
28CriticalSection::~CriticalSection()
30 DeleteCriticalSection(&_section);
33void CriticalSection::lock()
35 EnterCriticalSection(&_section);
38void CriticalSection::unlock()
40 LeaveCriticalSection(&_section);
43WinPREvent::WinPREvent(
bool initial) : _handle(CreateEventA(nullptr, TRUE, initial, nullptr))
47WinPREvent::~WinPREvent()
49 (void)CloseHandle(_handle);
54 (void)SetEvent(_handle);
57void WinPREvent::clear()
59 (void)ResetEvent(_handle);
62bool WinPREvent::isSet()
const
64 return WaitForSingleObject(_handle, 0) == WAIT_OBJECT_0;
67HANDLE WinPREvent::handle()
const
78 if (l.width != r.width)
80 if (l.height != r.height)
82 if (l.is_primary != r.is_primary)
84 if (l.orig_screen != r.orig_screen)
87 return l.attributes == r.attributes;
92 if (l.physicalWidth != r.physicalWidth)
94 if (l.physicalHeight != r.physicalHeight)
96 if (l.orientation != r.orientation)
98 if (l.desktopScaleFactor != r.desktopScaleFactor)
100 if (l.deviceScaleFactor != r.deviceScaleFactor)