forked from KolibriOS/kolibrios
9ba1adb152
- Now used standart SDL timer functions; - Removed old files and useless functions. git-svn-id: svn://kolibrios.org@9790 a494cfbc-eb01-0410-851d-a64ba20cac60
38 lines
772 B
C++
38 lines
772 B
C++
#include <stdlib.h>
|
|
#include <sys/ksys.h>
|
|
#include <string.h>
|
|
|
|
extern unsigned screenWidth;
|
|
extern unsigned screenHeight;
|
|
|
|
void kolibri_set_win_max(void){
|
|
unsigned multip1, multip2;
|
|
ksys_pos_t screen_size = _ksys_screen_size();
|
|
|
|
screen_size.y++;
|
|
screen_size.x++;
|
|
|
|
multip1 = (screen_size.y)/240;
|
|
multip2 = (screen_size.y)/200;
|
|
|
|
do{
|
|
screenWidth = 320 * multip1;
|
|
screenHeight = 240 * multip1;
|
|
|
|
if(screenWidth<=screen_size.x){
|
|
break;
|
|
}
|
|
|
|
screenWidth = 320 * multip2;
|
|
screenHeight = 200 * multip2;
|
|
|
|
if(screenWidth<=screen_size.y){
|
|
break;
|
|
}
|
|
|
|
multip1--;
|
|
multip2--;
|
|
|
|
}while(multip1>0 && multip2>0);
|
|
}
|