Revert "Allow sparse rendering while resizing/moving application on Windows"

This reverts commit c873ff2f2e.
This commit is contained in:
Joshua Granick
2020-03-31 14:31:06 -07:00
parent 8fc7b43eda
commit fcac041024
2 changed files with 0 additions and 54 deletions

View File

@@ -7,11 +7,6 @@
#include <CoreFoundation/CoreFoundation.h>
#endif
#ifdef HX_WINDOWS
#include <windows.h>
#include <SDL_syswm.h>
#endif
#ifdef EMSCRIPTEN
#include "emscripten.h"
#endif
@@ -26,8 +21,6 @@ namespace lime {
const int analogAxisDeadZone = 1000;
std::map<int, std::map<int, int> > gamepadsAxisMap;
bool inBackground = false;
bool winTimerActive = false;
int winTimerID = 1;
SDLApplication::SDLApplication () {
@@ -332,11 +325,6 @@ namespace lime {
lastUpdate = SDL_GetTicks ();
nextUpdate = lastUpdate;
#ifdef HX_WINDOWS
SDL_AddEventWatch (SDLApplication::WatchEvent, nullptr);
SDL_EventState (SDL_SYSWMEVENT, SDL_ENABLE);
#endif
}
@@ -887,15 +875,6 @@ namespace lime {
while (SDL_PollEvent (&event)) {
#ifdef HX_WINDOWS
if (winTimerActive) {
KillTimer (GetActiveWindow (), winTimerID);
winTimerActive = false;
}
#endif
HandleEvent (&event);
event.type = -1;
if (!active)
@@ -1003,38 +982,6 @@ namespace lime {
}
int SDLApplication::WatchEvent (void* userData, SDL_Event* event) {
#ifdef HX_WINDOWS
if (event->type == SDL_SYSWMEVENT) {
const auto& message = event->syswm.msg->msg.win;
if (message.msg == WM_ENTERSIZEMOVE) {
winTimerActive = SetTimer (GetActiveWindow (), winTimerID, currentApplication->framePeriod, nullptr);
// TODO: Are we thread-safe to call GL here?
RenderEvent::Dispatch (&currentApplication->renderEvent);
} else if (message.msg == WM_TIMER) {
if (message.wParam == winTimerID) {
RenderEvent::Dispatch (&currentApplication->renderEvent);
}
}
}
#endif
return 0;
}
Application* CreateApplication () {
return new SDLApplication ();

View File

@@ -54,7 +54,6 @@ namespace lime {
static void UpdateFrame ();
static void UpdateFrame (void*);
static int WatchEvent (void* userData, SDL_Event* event);
static SDLApplication* currentApplication;