annotate src/video/ps3/SDL_ps3modes.c @ 3152:7f3341cccf42 gsoc2009_ps3

Working 1080p, 720p, 480p videomodes and double buffering.
author Martin Lowinski <martin@goldtopf.org>
date Thu, 06 Aug 2009 12:24:47 +0000
parents 4a88137385f9
children cce01ba54174
rev   line source
3151
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
1 /*
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
2 SDL - Simple DirectMedia Layer
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
3 Copyright (C) 1997-2009 Sam Lantinga
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
4
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
5 This library is free software; you can redistribute it and/or
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
6 modify it under the terms of the GNU Lesser General Public
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
7 License as published by the Free Software Foundation; either
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
8 version 2.1 of the License, or (at your option) any later version.
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
9
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
10 This library is distributed in the hope that it will be useful,
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
13 Lesser General Public License for more details.
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
14
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
15 You should have received a copy of the GNU Lesser General Public
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
16 License along with this library; if not, write to the Free Software
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
18
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
19 Sam Lantinga
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
20 slouken@libsdl.org
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
21 */
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
22 #include "SDL_config.h"
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
23
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
24 #include "SDL_ps3video.h"
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
25
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
26 void
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
27 PS3_InitModes(_THIS)
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
28 {
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
29 deprintf(1, "+PS3_InitModes()\n");
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
30 SDL_VideoDisplay display;
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
31 SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
32 SDL_DisplayMode mode;
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
33 PS3_DisplayModeData *modedata;
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
34 unsigned long vid = 0;
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
35
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
36 modedata = (PS3_DisplayModeData *) SDL_malloc(sizeof(*modedata));
3152
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
37 if (!modedata) {
3151
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
38 return;
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
39 }
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
40
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
41 /* Setting up the DisplayMode */
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
42 struct ps3fb_ioctl_res res;
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
43 if (ioctl(data->fbdev, PS3FB_IOCTL_SCREENINFO, &res)) {
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
44 SDL_SetError("Can't get PS3FB_IOCTL_SCREENINFO");
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
45 }
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
46 mode.format = SDL_PIXELFORMAT_RGB888;
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
47 mode.refresh_rate = 0;
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
48 mode.w = res.xres;
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
49 mode.h = res.yres;
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
50
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
51 /* Setting up driver specific mode data */
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
52 if (ioctl(data->fbdev, PS3FB_IOCTL_GETMODE, (unsigned long)&vid)) {
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
53 SDL_SetError("Can't get PS3FB_IOCTL_GETMODE");
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
54 }
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
55 deprintf(2, "PS3FB_IOCTL_GETMODE = %u\n", vid);
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
56 modedata->mode = vid;
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
57 mode.driverdata = modedata;
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
58
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
59 SDL_zero(display);
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
60 display.desktop_mode = mode;
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
61 display.current_mode = mode;
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
62
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
63 SDL_AddVideoDisplay(&display);
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
64 deprintf(1, "-PS3_InitModes()\n");
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
65 }
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
66
3152
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
67 static SDL_DisplayMode ps3fb_modedb[] = {
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
68 /* VESA */
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
69 {SDL_PIXELFORMAT_RGB888, 1280, 768, 0, NULL}, // WXGA
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
70 {SDL_PIXELFORMAT_RGB888, 1280, 1024, 0, NULL}, // SXGA
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
71 {SDL_PIXELFORMAT_RGB888, 1920, 1200, 0, NULL}, // WUXGA
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
72 /* Native resolutions (progressive, "fullscreen") */
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
73 {SDL_PIXELFORMAT_RGB888, 720, 480, 0, NULL}, // 480p
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
74 {SDL_PIXELFORMAT_RGB888, 1280, 720, 0, NULL}, // 720p
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
75 {SDL_PIXELFORMAT_RGB888, 1920, 1080, 0, NULL} // 1080p
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
76 };
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
77
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
78 static PS3_DisplayModeData ps3fb_data[] = {
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
79 {11}, {12}, {13}, {130}, {131}, {133},
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
80 };
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
81
3151
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
82 void
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
83 PS3_GetDisplayModes(_THIS) {
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
84 deprintf(1, "+PS3_GetDisplayModes()\n");
3152
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
85 SDL_DisplayMode mode;
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
86 unsigned int nummodes;
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
87
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
88 nummodes = sizeof(ps3fb_modedb) / sizeof(SDL_DisplayMode);
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
89
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
90 int n;
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
91 for (n=0; n<nummodes; ++n) {
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
92 /* Get driver specific mode data */
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
93 ps3fb_modedb[n].driverdata = &ps3fb_data[n];
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
94
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
95 /* Add DisplayMode to list */
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
96 deprintf(2, "Adding resolution %u x %u\n", ps3fb_modedb[n].w, ps3fb_modedb[n].h);
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
97 SDL_AddDisplayMode(_this->current_display, &ps3fb_modedb[n]);
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
98 }
3151
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
99 deprintf(1, "-PS3_GetDisplayModes()\n");
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
100 }
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
101
3152
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
102 int
3151
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
103 PS3_SetDisplayMode(_THIS, SDL_DisplayMode * mode)
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
104 {
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
105 deprintf(1, "+PS3_SetDisplayMode()\n");
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
106 SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
3152
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
107 PS3_DisplayModeData *dispdata = (PS3_DisplayModeData *) mode->driverdata;
3151
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
108
3152
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
109 /* Set the new DisplayMode */
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
110 deprintf(2, "Setting PS3FB_MODE to %u\n", dispdata->mode);
3151
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
111 if (ioctl(data->fbdev, PS3FB_IOCTL_SETMODE, (unsigned long)&dispdata->mode)) {
3152
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
112 deprintf(2, "Could not set PS3FB_MODE\n");
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
113 SDL_SetError("Could not set PS3FB_MODE\n");
3151
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
114 return -1;
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
115 }
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
116
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
117 deprintf(1, "-PS3_SetDisplayMode()\n");
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
118 return 0;
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
119 }
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
120
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
121 void
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
122 PS3_QuitModes(_THIS) {
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
123 deprintf(1, "+PS3_QuitModes()\n");
3152
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
124
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
125 /* There was no mem allocated for driverdata */
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
126 int i, j;
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
127 for (i = _this->num_displays; i--;) {
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
128 SDL_VideoDisplay *display = &_this->displays[i];
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
129 for (j = display->num_display_modes; j--;) {
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
130 display->display_modes[j].driverdata = NULL;
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
131 }
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
132 }
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
133
3151
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
134 deprintf(1, "-PS3_QuitModes()\n");
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
135 }
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
136
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
137 /* vi: set ts=4 sw=4 expandtab: */