annotate src/video/ps3/SDL_ps3modes.c @ 3157:cce01ba54174 gsoc2009_ps3

Added comments, clean up.
author Martin Lowinski <martin@goldtopf.org>
date Thu, 27 Aug 2009 11:33:56 +0000
parents 7f3341cccf42
children
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
3157
cce01ba54174 Added comments, clean up.
Martin Lowinski <martin@goldtopf.org>
parents: 3152
diff changeset
41 /* Setting up the DisplayMode based on current settings */
3151
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
3157
cce01ba54174 Added comments, clean up.
Martin Lowinski <martin@goldtopf.org>
parents: 3152
diff changeset
51 /* Setting up driver specific mode data,
cce01ba54174 Added comments, clean up.
Martin Lowinski <martin@goldtopf.org>
parents: 3152
diff changeset
52 * Get the current ps3 specific videmode number */
3151
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
53 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
54 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
55 }
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
56 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
57 modedata->mode = vid;
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
58 mode.driverdata = modedata;
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
59
3157
cce01ba54174 Added comments, clean up.
Martin Lowinski <martin@goldtopf.org>
parents: 3152
diff changeset
60 /* Set display's videomode and add it */
3151
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
61 SDL_zero(display);
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
62 display.desktop_mode = mode;
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
63 display.current_mode = mode;
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
64
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
65 SDL_AddVideoDisplay(&display);
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
66 deprintf(1, "-PS3_InitModes()\n");
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
67 }
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
68
3157
cce01ba54174 Added comments, clean up.
Martin Lowinski <martin@goldtopf.org>
parents: 3152
diff changeset
69 /* DisplayModes available on the PS3 */
3152
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
70 static SDL_DisplayMode ps3fb_modedb[] = {
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
71 /* VESA */
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
72 {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
73 {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
74 {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
75 /* Native resolutions (progressive, "fullscreen") */
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
76 {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
77 {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
78 {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
79 };
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
80
3157
cce01ba54174 Added comments, clean up.
Martin Lowinski <martin@goldtopf.org>
parents: 3152
diff changeset
81 /* PS3 videomode number according to ps3fb_modedb */
3152
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
82 static PS3_DisplayModeData ps3fb_data[] = {
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
83 {11}, {12}, {13}, {130}, {131}, {133},
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
84 };
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
85
3151
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
86 void
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
87 PS3_GetDisplayModes(_THIS) {
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
88 deprintf(1, "+PS3_GetDisplayModes()\n");
3152
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
89 SDL_DisplayMode mode;
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
90 unsigned int nummodes;
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
91
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
92 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
93
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
94 int n;
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
95 for (n=0; n<nummodes; ++n) {
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
96 /* Get driver specific mode data */
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
97 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
98
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
99 /* Add DisplayMode to list */
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
100 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
101 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
102 }
3151
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
103 deprintf(1, "-PS3_GetDisplayModes()\n");
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
3152
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
106 int
3151
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
107 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
108 {
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
109 deprintf(1, "+PS3_SetDisplayMode()\n");
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
110 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
111 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
112
3152
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
113 /* Set the new DisplayMode */
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
114 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
115 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
116 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
117 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
118 return -1;
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 deprintf(1, "-PS3_SetDisplayMode()\n");
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
122 return 0;
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
123 }
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
124
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
125 void
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
126 PS3_QuitModes(_THIS) {
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
127 deprintf(1, "+PS3_QuitModes()\n");
3152
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
128
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
129 /* 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
130 int i, j;
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
131 for (i = _this->num_displays; i--;) {
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
132 SDL_VideoDisplay *display = &_this->displays[i];
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
133 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
134 display->display_modes[j].driverdata = NULL;
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
135 }
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
136 }
7f3341cccf42 Working 1080p, 720p, 480p videomodes and double buffering.
Martin Lowinski <martin@goldtopf.org>
parents: 3151
diff changeset
137
3151
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
138 deprintf(1, "-PS3_QuitModes()\n");
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
139 }
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
140
4a88137385f9 Moved mode functions to SDL_ps3modes and fixed minor stuff.
Martin Lowinski <martin@goldtopf.org>
parents:
diff changeset
141 /* vi: set ts=4 sw=4 expandtab: */