On 14/05/10 18:02, pancake wrote:
> 
> [panc...@dazo tmp]$ cat sdldwm.c
> /*
>  * Copyright (C) 2010
>  * pancake <youterm.com>
>  * 
>  * $ gcc sdldwm.c -shared -ldl -fPIC -o sdldwm.so
>  * $ LD_PRELOAD=./sdldwm.so programname
>  */
> #define _GNU_SOURCE
> #include <dlfcn.h>
> 
> static void *(*svm)(int w, int h, int b, unsigned int f);
> static void __() __attribute__ ((constructor));
> static void __() {   svm = dlsym(RTLD_NEXT, "SDL_SetVideoMode"); }
> 
> void *SDL_SetVideoMode(int w, int h, int b, unsigned int f) {
>         return svm(w,h,b,f|0x10);
> }
> 
> what about this hack?
> 

I think you will find that this would just stop the app working; when
the SDL_RESIZABLE flag is set the app has to react to SDL_VIDEORESIZE
events from SDL by re-calling SDL_SetVideoMode with the size in the
SDL_VIDEORESIZE event.  If the app isn't set up to do this then things
will go wrong...

-- 
Thomas Spurden

Reply via email to