Mercurial > sdl-ios-xcode
comparison src/video/ps2gs/SDL_gsvideo.c @ 1545:8d9bb0cf2c2a
Added current_w and current_h to the SDL_VideoInfo structure, which is set to the desktop resolution during video intialization, and then set to the current resolution when a video mode is set.
SDL_SetVideoMode() now accepts 0 for width or height and will use the current video mode (or the desktop mode if no mode has been set.)
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 15 Mar 2006 17:46:41 +0000 |
parents | d910939febfa |
children | 782fd950bd46 c121d94672cb a1b03ba2fcd0 |
comparison
equal
deleted
inserted
replaced
1544:ab1e4c41ab71 | 1545:8d9bb0cf2c2a |
---|---|
296 console_fd = -1; | 296 console_fd = -1; |
297 SDL_SetError("Unable to open %s", PS2_DEV_MEM); | 297 SDL_SetError("Unable to open %s", PS2_DEV_MEM); |
298 return(-1); | 298 return(-1); |
299 } | 299 } |
300 | 300 |
301 /* Determine the current screen depth */ | |
302 if ( ioctl(console_fd, PS2IOC_GSCREENINFO, &vinfo) < 0 ) { | 301 if ( ioctl(console_fd, PS2IOC_GSCREENINFO, &vinfo) < 0 ) { |
303 close(memory_fd); | 302 close(memory_fd); |
304 close(console_fd); | 303 close(console_fd); |
305 console_fd = -1; | 304 console_fd = -1; |
306 SDL_SetError("Couldn't get console pixel format"); | 305 SDL_SetError("Couldn't get console pixel format"); |
307 return(-1); | 306 return(-1); |
308 } | 307 } |
308 | |
309 /* Determine the current screen size */ | |
310 this->info.current_w = vinfo.w; | |
311 this->info.current_h = vinfo.h; | |
312 | |
313 /* Determine the current screen depth */ | |
309 switch (vinfo.psm) { | 314 switch (vinfo.psm) { |
310 /* Supported pixel formats */ | 315 /* Supported pixel formats */ |
311 case PS2_GS_PSMCT32: | 316 case PS2_GS_PSMCT32: |
312 case PS2_GS_PSMCT24: | 317 case PS2_GS_PSMCT24: |
313 case PS2_GS_PSMCT16: | 318 case PS2_GS_PSMCT16: |