changeset 20059:0eb3d2ec943b draft

(svn r24992) -Codechange: [SDL] Make CreateMainSurface and PollEvent private methods instead of static functions.
author matthijs <matthijs@openttd.org>
date Thu, 14 Feb 2013 11:06:06 +0000
parents 28f66ec9e48b
children 33e0e21382ef
files src/video/sdl_v.cpp src/video/sdl_v.h
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/sdl_v.cpp
+++ b/src/video/sdl_v.cpp
@@ -216,7 +216,7 @@
 #define SDL_LoadBMP(file)	SDL_LoadBMP_RW(SDL_CALL SDL_RWFromFile(file, "rb"), 1)
 #endif
 
-static bool CreateMainSurface(uint w, uint h)
+bool VideoDriver_SDL::CreateMainSurface(uint w, uint h)
 {
 	SDL_Surface *newscreen, *icon;
 	char caption[50];
@@ -394,7 +394,7 @@
 	return (key << 16) + sym->unicode;
 }
 
-static int PollEvent()
+int VideoDriver_SDL::PollEvent()
 {
 	SDL_Event ev;
 
--- a/src/video/sdl_v.h
+++ b/src/video/sdl_v.h
@@ -34,6 +34,9 @@
 	/* virtual */ bool ClaimMousePointer();
 
 	/* virtual */ const char *GetName() const { return "sdl"; }
+private:
+	int PollEvent();
+	bool CreateMainSurface(uint w, uint h);
 };
 
 /** Factory for the SDL video driver. */