Browse Source

Fix timedemo on SDL1

pull/5592/head
Gleb Mazovetskiy 3 years ago committed by Anders Jenbo
parent
commit
cffb2566df
  1. 4
      Source/engine/demomode.cpp
  2. 2
      Source/utils/display.cpp

4
Source/engine/demomode.cpp

@ -265,8 +265,8 @@ bool LoadDemoMessages(int i)
case 0x100: // SDL_QUIT
break;
default:
if (eventType < SDL_USEREVENT) {
app_fatal(StrCat("Unknown event ", static_cast<uint32_t>(eventType)));
if (eventType < 0x8000) { // SDL_USEREVENT
app_fatal(StrCat("Unknown event ", eventType));
}
break;
}

2
Source/utils/display.cpp

@ -497,6 +497,8 @@ SDL_Surface *GetOutputSurface()
bool OutputRequiresScaling()
{
#ifdef USE_SDL1
if (HeadlessMode)
return false;
return gnScreenWidth != GetOutputSurface()->w || gnScreenHeight != GetOutputSurface()->h;
#else // SDL2, scaling handled by renderer.
return false;

Loading…
Cancel
Save