(PS3) Some more work on PS3 menu front
This commit is contained in:
parent
5edf67bba8
commit
c7e32cbbd2
|
@ -173,9 +173,12 @@ struct settings
|
||||||
struct console_settings
|
struct console_settings
|
||||||
{
|
{
|
||||||
bool block_config_read;
|
bool block_config_read;
|
||||||
#ifdef __CELLOS_LV2__
|
|
||||||
bool return_to_multiman_enable;
|
bool return_to_multiman_enable;
|
||||||
#endif
|
uint32_t * supported_resolutions;
|
||||||
|
uint32_t supported_resolutions_count;
|
||||||
|
uint32_t current_resolution_index;
|
||||||
|
uint32_t current_resolution_id;
|
||||||
|
uint32_t initial_resolution_id;
|
||||||
bool screenshots_enable;
|
bool screenshots_enable;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 55 KiB |
|
@ -85,6 +85,8 @@ bool g_quitting;
|
||||||
unsigned g_frame_count;
|
unsigned g_frame_count;
|
||||||
void *g_gl;
|
void *g_gl;
|
||||||
|
|
||||||
|
static CellVideoOutState g_video_state;
|
||||||
|
|
||||||
typedef struct gl
|
typedef struct gl
|
||||||
{
|
{
|
||||||
GLuint pbo;
|
GLuint pbo;
|
||||||
|
@ -993,6 +995,56 @@ const video_driver_t video_gl = {
|
||||||
.ident = "gl"
|
.ident = "gl"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void get_all_available_resolutions (void)
|
||||||
|
{
|
||||||
|
bool defaultresolution;
|
||||||
|
uint32_t i, resolution_count;
|
||||||
|
uint16_t num_videomodes;
|
||||||
|
|
||||||
|
defaultresolution = true;
|
||||||
|
|
||||||
|
uint32_t videomode[] = {
|
||||||
|
CELL_VIDEO_OUT_RESOLUTION_480, CELL_VIDEO_OUT_RESOLUTION_576,
|
||||||
|
CELL_VIDEO_OUT_RESOLUTION_960x1080, CELL_VIDEO_OUT_RESOLUTION_720,
|
||||||
|
CELL_VIDEO_OUT_RESOLUTION_1280x1080, CELL_VIDEO_OUT_RESOLUTION_1440x1080,
|
||||||
|
CELL_VIDEO_OUT_RESOLUTION_1600x1080, CELL_VIDEO_OUT_RESOLUTION_1080};
|
||||||
|
|
||||||
|
num_videomodes = sizeof(videomode)/sizeof(uint32_t);
|
||||||
|
|
||||||
|
resolution_count = 0;
|
||||||
|
for (i = 0; i < num_videomodes; i++)
|
||||||
|
if (cellVideoOutGetResolutionAvailability(CELL_VIDEO_OUT_PRIMARY, videomode[i], CELL_VIDEO_OUT_ASPECT_AUTO,0))
|
||||||
|
resolution_count++;
|
||||||
|
|
||||||
|
g_console.supported_resolutions = (uint32_t*)malloc(resolution_count * sizeof(uint32_t));
|
||||||
|
|
||||||
|
g_console.supported_resolutions_count = 0;
|
||||||
|
for (i = 0; i < num_videomodes; i++)
|
||||||
|
{
|
||||||
|
if (cellVideoOutGetResolutionAvailability(CELL_VIDEO_OUT_PRIMARY, videomode[i], CELL_VIDEO_OUT_ASPECT_AUTO,0))
|
||||||
|
{
|
||||||
|
g_console.supported_resolutions[g_console.supported_resolutions_count++] = videomode[i];
|
||||||
|
g_console.initial_resolution_id = videomode[i];
|
||||||
|
|
||||||
|
if (g_console.current_resolution_id == videomode[i])
|
||||||
|
{
|
||||||
|
defaultresolution = false;
|
||||||
|
g_console.current_resolution_index = g_console.supported_resolutions_count-1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* In case we didn't specify a resolution - make the last resolution*/
|
||||||
|
/* that was added to the list (the highest resolution) the default resolution*/
|
||||||
|
if (g_console.current_resolution_id > num_videomodes || defaultresolution)
|
||||||
|
g_console.current_resolution_index = g_console.supported_resolutions_count-1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ps3_set_resolution (void)
|
||||||
|
{
|
||||||
|
cellVideoOutGetState(CELL_VIDEO_OUT_PRIMARY, 0, &g_video_state);
|
||||||
|
}
|
||||||
|
|
||||||
// PS3 needs a working graphics stack before SSNES even starts.
|
// PS3 needs a working graphics stack before SSNES even starts.
|
||||||
// To deal with this main.c,
|
// To deal with this main.c,
|
||||||
// the top level module owns the instance, and is created beforehand.
|
// the top level module owns the instance, and is created beforehand.
|
||||||
|
@ -1007,6 +1059,8 @@ void ps3_video_init(void)
|
||||||
video_info.smooth = true;
|
video_info.smooth = true;
|
||||||
video_info.input_scale = 2;
|
video_info.input_scale = 2;
|
||||||
g_gl = gl_init(&video_info, NULL, NULL);
|
g_gl = gl_init(&video_info, NULL, NULL);
|
||||||
|
get_all_available_resolutions();
|
||||||
|
ps3_set_resolution();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ps3_video_deinit(void)
|
void ps3_video_deinit(void)
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 8.9 KiB |
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<app version="1">
|
||||||
|
<name>SSNES</name>
|
||||||
|
<coder>Themaister</coder>
|
||||||
|
<version>0.9.4</version>
|
||||||
|
<release_date>2012</release_date>
|
||||||
|
<short_description>Multi-system emulator</short_description>
|
||||||
|
<long_description>A port of SSNES to the Wii.</long_description>
|
||||||
|
<no_ios_reload/>
|
||||||
|
</app>
|
Loading…
Reference in New Issue