comparison src/video/gem/SDL_gemvideo.c @ 557:0ce5a68278fd

Updated Atari port for new system headers (thanks Patrice!)
author Sam Lantinga <slouken@libsdl.org>
date Sat, 07 Dec 2002 06:54:47 +0000
parents 9ff7e90aaa94
children 0136d21b7764
comparison
equal deleted inserted replaced
556:08588ee79a67 557:0ce5a68278fd
40 40
41 /* Mint includes */ 41 /* Mint includes */
42 #include <gem.h> 42 #include <gem.h>
43 #include <gemx.h> 43 #include <gemx.h>
44 #include <mint/osbind.h> 44 #include <mint/osbind.h>
45 #include <sys/cookie.h> 45 #include <mint/cookie.h>
46 46
47 #include "SDL.h" 47 #include "SDL.h"
48 #include "SDL_error.h" 48 #include "SDL_error.h"
49 #include "SDL_video.h" 49 #include "SDL_video.h"
50 #include "SDL_mouse.h" 50 #include "SDL_mouse.h"
103 103
104 /* GEM driver bootstrap functions */ 104 /* GEM driver bootstrap functions */
105 105
106 static int GEM_Available(void) 106 static int GEM_Available(void)
107 { 107 {
108 short ap_id;
109 const char *envr = getenv("SDL_VIDEODRIVER"); 108 const char *envr = getenv("SDL_VIDEODRIVER");
110 109
111 /* Check if user asked a different video driver */ 110 /* Check if user asked a different video driver */
112 if ((envr) && (strcmp(envr, GEM_VID_DRIVER_NAME)!=0)) { 111 if ((envr) && (strcmp(envr, GEM_VID_DRIVER_NAME)!=0)) {
113 return 0; 112 return 0;
114 } 113 }
115 114
116 /* Test if AES available */ 115 /* Test if AES available */
117 ap_id = appl_init(); 116 if (appl_init() == -1)
118 if (ap_id == -1)
119 return 0; 117 return 0;
120 118
121 appl_exit(); 119 appl_exit();
122 return 1; 120 return 1;
123 } 121 }
372 { 370 {
373 int i; 371 int i;
374 short work_in[12], work_out[272], dummy; 372 short work_in[12], work_out[272], dummy;
375 373
376 /* Open AES (Application Environment Services) */ 374 /* Open AES (Application Environment Services) */
377 GEM_ap_id = appl_init(); 375 if (appl_init() == -1) {
378 if (GEM_ap_id == -1) {
379 fprintf(stderr,"Can not open AES\n"); 376 fprintf(stderr,"Can not open AES\n");
380 return 1; 377 return 1;
381 } 378 }
382 379
383 /* Read version and features */ 380 /* Read version and features */
384 GEM_version = aes_global[0]; 381 GEM_version = aes_params.global[0];
385 if (GEM_version >= 0x0400) { 382 if (GEM_version >= 0x0400) {
386 short ap_gout[4]; 383 short ap_gout[4];
387 384
388 GEM_wfeatures=0; 385 GEM_wfeatures=0;
389 if (appl_getinfo(AES_WINDOW, &ap_gout[0], &ap_gout[1], &ap_gout[2], &ap_gout[3])==0) { 386 if (appl_getinfo(AES_WINDOW, &ap_gout[0], &ap_gout[1], &ap_gout[2], &ap_gout[3])==0) {