HostInterface: Move timer resolution increase to base class

This commit is contained in:
Connor McLaughlin
2020-02-16 00:14:37 +09:00
parent 1e009133ae
commit 6a0c15b649
9 changed files with 70 additions and 23 deletions

View File

@ -21,18 +21,11 @@
Log_SetChannel(SDLHostInterface);
#ifdef WIN32
#include "common/windows_headers.h"
#include "d3d11_host_display.h"
#include <mmsystem.h>
#endif
SDLHostInterface::SDLHostInterface()
{
// Increase timer/sleep resolution since we use it for throttling.
#ifdef WIN32
timeBeginPeriod(1);
#endif
m_update_settings_event_id = SDL_RegisterEvents(1);
}
@ -47,10 +40,6 @@ SDLHostInterface::~SDLHostInterface()
if (m_window)
DestroySDLWindow();
#ifdef WIN32
timeEndPeriod(1);
#endif
}
bool SDLHostInterface::CreateSDLWindow()