Fix many bugs introduced by the gp2x "hack" of not having a windowed mode.

Still not working perfectly, but at least i can manage to get the program in 320x240 by default on gp2x, without modifying the config files.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@856 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Adrien Destugues
2009-06-11 16:19:45 +00:00
parent 92b5727994
commit 8987f07c8a
5 changed files with 38 additions and 13 deletions

View File

@@ -713,14 +713,18 @@ int Load_INI(T_Config * conf)
}
// Optionnel, les dimensions de la fenêtre (à partir de beta 97.0%)
Video_mode[0].Width = 640;
Video_mode[0].Height = 480;
if (!Load_INI_get_values (file,buffer,"Default_window_size",2,values))
// Do that only if the first mode is actually windowed (not the case on gp2x for example)
if(Video_mode[0].Fullscreen==0)
{
if ((values[0]>=320))
Video_mode[0].Width = values[0];
if ((values[1]>=200))
Video_mode[0].Height = values[1];
Video_mode[0].Width = 640;
Video_mode[0].Height = 480;
if (!Load_INI_get_values (file,buffer,"Default_window_size",2,values))
{
if ((values[0]>=320))
Video_mode[0].Width = values[0];
if ((values[1]>=200))
Video_mode[0].Height = values[1];
}
}
conf->Mouse_merge_movement=100;