This will XOR the current Window_Mode value so you will always get either SDL_SWSURFACE (windowed) or SDL_FULLSCREEN (fullscreen). This works perfectly, and the game flips from one mode to the other when the button is clicked, however...now onto my burning question : when looking at my Windows Task Manager I see that memory is being leaked, so is this because everytime i call SDL_SetVideoMode, the old window data in memory is abandoned, hence causing the leak? If so, how can I manually release the old window image from memory?
I know calling SDL_Quit() releases the old window, but then I will have to re-initialize everything again, as well as reload all my SDL_Surface* image pointers, etc.
Anyone have any ideas? Is using the long way round the best solution afterall?