mirror of
https://github.com/libretro/RetroArch
synced 2025-03-25 16:44:01 +00:00
(PS3) Cleanups
This commit is contained in:
parent
4f0cec7b1e
commit
658c5d4ceb
@ -42,23 +42,18 @@ typedef struct gfx_ctx_ps3_data
|
|||||||
#if defined(HAVE_PSGL)
|
#if defined(HAVE_PSGL)
|
||||||
PSGLdevice* gl_device;
|
PSGLdevice* gl_device;
|
||||||
PSGLcontext* gl_context;
|
PSGLcontext* gl_context;
|
||||||
|
#else
|
||||||
|
void *empty;
|
||||||
#endif
|
#endif
|
||||||
} gfx_ctx_ps3_data_t;
|
} gfx_ctx_ps3_data_t;
|
||||||
|
|
||||||
static unsigned gfx_ctx_ps3_get_resolution_width(unsigned resolution_id)
|
static void gfx_ctx_ps3_get_resolution(unsigned idx, unsigned *width, unsigned *height)
|
||||||
{
|
{
|
||||||
CellVideoOutResolution resolution;
|
CellVideoOutResolution resolution;
|
||||||
cellVideoOutGetResolution(resolution_id, &resolution);
|
cellVideoOutGetResolution(idx, &resolution);
|
||||||
|
|
||||||
return resolution.width;
|
*width = resolution.width;
|
||||||
}
|
*height = resolution.height;
|
||||||
|
|
||||||
static unsigned gfx_ctx_ps3_get_resolution_height(unsigned resolution_id)
|
|
||||||
{
|
|
||||||
CellVideoOutResolution resolution;
|
|
||||||
cellVideoOutGetResolution(resolution_id, &resolution);
|
|
||||||
|
|
||||||
return resolution.height;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static float gfx_ctx_ps3_get_aspect_ratio(void *data)
|
static float gfx_ctx_ps3_get_aspect_ratio(void *data)
|
||||||
@ -143,17 +138,7 @@ static void gfx_ctx_ps3_get_available_resolutions(void)
|
|||||||
|
|
||||||
static void gfx_ctx_ps3_set_swap_interval(void *data, unsigned interval)
|
static void gfx_ctx_ps3_set_swap_interval(void *data, unsigned interval)
|
||||||
{
|
{
|
||||||
driver_t *driver = driver_get_ptr();
|
|
||||||
gfx_ctx_ps3_data_t *ps3 = (gfx_ctx_ps3_data_t*)driver->video_context_data;
|
|
||||||
|
|
||||||
(void)data;
|
|
||||||
|
|
||||||
#if defined(HAVE_PSGL)
|
#if defined(HAVE_PSGL)
|
||||||
if (!ps3)
|
|
||||||
return;
|
|
||||||
if (!ps3->gl_context)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (interval)
|
if (interval)
|
||||||
glEnable(GL_VSYNC_SCE);
|
glEnable(GL_VSYNC_SCE);
|
||||||
else
|
else
|
||||||
@ -276,8 +261,9 @@ static bool gfx_ctx_ps3_init(void *data)
|
|||||||
if (global->console.screen.resolutions.current.id)
|
if (global->console.screen.resolutions.current.id)
|
||||||
{
|
{
|
||||||
params.enable |= PSGL_DEVICE_PARAMETERS_WIDTH_HEIGHT;
|
params.enable |= PSGL_DEVICE_PARAMETERS_WIDTH_HEIGHT;
|
||||||
params.width = gfx_ctx_ps3_get_resolution_width(global->console.screen.resolutions.current.id);
|
|
||||||
params.height = gfx_ctx_ps3_get_resolution_height(global->console.screen.resolutions.current.id);
|
gfx_ctx_ps3_get_resolution(global->console.screen.resolutions.current.id, ¶ms.width, ¶ms.height);
|
||||||
|
|
||||||
global->console.screen.pal_enable = false;
|
global->console.screen.pal_enable = false;
|
||||||
|
|
||||||
if (params.width == 720 && params.height == 576)
|
if (params.width == 720 && params.height == 576)
|
||||||
@ -356,11 +342,7 @@ static void gfx_ctx_ps3_destroy(void *data)
|
|||||||
static void gfx_ctx_ps3_input_driver(void *data,
|
static void gfx_ctx_ps3_input_driver(void *data,
|
||||||
const input_driver_t **input, void **input_data)
|
const input_driver_t **input, void **input_data)
|
||||||
{
|
{
|
||||||
void *ps3input = NULL;
|
void *ps3input = input_ps3.init();
|
||||||
|
|
||||||
(void)data;
|
|
||||||
|
|
||||||
ps3input = input_ps3.init();
|
|
||||||
|
|
||||||
*input = ps3input ? &input_ps3 : NULL;
|
*input = ps3input ? &input_ps3 : NULL;
|
||||||
*input_data = ps3input;
|
*input_data = ps3input;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user