diff options
author | Jean-Luc Peurière <jlp@nerim.net> | 2004-07-28 00:40:42 +0400 |
---|---|---|
committer | Jean-Luc Peurière <jlp@nerim.net> | 2004-07-28 00:40:42 +0400 |
commit | f3beeec296a773300999a4c7dac91e21c736f244 (patch) | |
tree | bf5470dc2de650ded78d35d14780e51e8c3999a0 /source/creator | |
parent | 0b9cf9006a062c8e6897b000c1204d963d1e5a4c (diff) |
new window behaviour for macos X computers :
if video card is open GL accelerated and has 16 Mo or more
start window in maximized mode wich is a full screen mode
but keeping access to other windows and sytem menu items
older comps start as usual
Diffstat (limited to 'source/creator')
-rw-r--r-- | source/creator/creator.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c index 3aacfe191f2..eb3cf302fed 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -109,12 +109,20 @@ extern char * build_type; static void print_help(); static void print_version(); + +/* defined is ghostwinlay , we can't include carbon here, conflict with DNA */ +#ifdef __APPLE +extern int checkAppleVideoCard(); +#endif + + /* for the callbacks: */ extern int pluginapi_force_ref(void); /* from blenpluginapi:pluginapi.c */ char bprogname[FILE_MAXDIR+FILE_MAXFILE]; /* from blenpluginapi:pluginapi.c */ + /* Initialise callbacks for the modules that need them */ void setCallbacks(void); @@ -214,9 +222,18 @@ int main(int argc, char **argv) argc= 1; + /* first let us check if we are hardware accelerated and with VRAM >= 16 Mo */ + + if (checkAppleVideoCard()) { + winlay_get_screensize(&scr_x, &scr_y); + /* let sneak under topbar */ + setprefsize(1, 1, scr_x-2, scr_y-24); + + } else { /* 40 + 684 + (headers) 22 + 22 = 768, the powerbook screen height */ setprefsize(120, 40, 850, 684); - + } + winlay_get_screensize(&scr_x, &scr_y); winlay_process_events(0); if (GHOST_HACK_getFirstFile(firstfilebuf)) { |