197
197
if (!(device->hidden->use_dev_mouse)) {
198
198
vectors_mask |= ATARI_XBIOS_MOUSEEVENTS; /* XBIOS mouse events */
200
if (Getcookie(C_MiNT, &dummy)==C_FOUND) {
200
/* if (Getcookie(C_MiNT, &dummy)==C_FOUND) {
201
201
vectors_mask = 0;
204
204
SDL_AtariXbios_InstallVectors(vectors_mask);
619
621
SDL_Surface *GEM_SetVideoMode(_THIS, SDL_Surface *current,
620
622
int width, int height, int bpp, Uint32 flags)
622
int maxwidth, maxheight;
623
624
Uint32 modeflags, screensize;
624
625
SDL_bool use_shadow1, use_shadow2;
626
/*--- Verify if asked mode can be used ---*/
627
if (flags & SDL_FULLSCREEN) {
633
maxheight=GEM_desk_h;
636
627
/* width must be multiple of 16, for vro_cpyfm() and c2p_convert() */
637
628
if ((width & 15) != 0) {
638
629
width = (width | 15) +1;
641
if ((maxwidth < width) || (maxheight < height) || (VDI_bpp != bpp)) {
642
SDL_SetError("Couldn't find requested mode in list");
632
/*--- Verify if asked mode can be used ---*/
633
if (VDI_bpp != bpp) {
634
SDL_SetError("%d bpp mode not supported", bpp);
638
if (flags & SDL_FULLSCREEN) {
639
if ((VDI_w < width) || (VDI_h < height)) {
640
SDL_SetError("%dx%d mode is too large", width, height);
646
645
/*--- Allocate the new pixel format for the screen ---*/
647
646
if ( ! SDL_ReallocFormat(current, VDI_bpp, VDI_redmask, VDI_greenmask, VDI_bluemask, VDI_alphamask) ) {
648
647
SDL_SetError("Couldn't allocate new pixel format for requested mode");
776
783
/* Open the window */
777
784
wind_open(GEM_handle,x2,y2,w2,h2);
779
/* Resize window if needed, to fit asked video mode */
780
if (modeflags & SDL_RESIZABLE) {
781
wind_get (GEM_handle, WF_WORKXYWH, &x2,&y2,&w2,&h2);
785
if ((w2!=width) || (h2!=height)) {
786
if (wind_calc(WC_BORDER, GEM_win_type, x2,y2,width,height, &x2,&y2,&w2,&h2)) {
787
wind_set (GEM_handle, WF_CURRXYWH, x2,y2,w2,h2);
786
/* Resize window to fit asked video mode */
787
wind_get (GEM_handle, WF_WORKXYWH, &x2,&y2,&w2,&h2);
788
if (wind_calc(WC_BORDER, GEM_win_type, x2,y2,width,height, &x2,&y2,&w2,&h2)) {
789
wind_set (GEM_handle, WF_CURRXYWH, x2,y2,w2,h2);