mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +00:00
[VITA] Allow usage of null context with gl1.
This commit is contained in:
parent
6394342b9c
commit
1533d618e5
@ -286,14 +286,16 @@ static void *gl1_gfx_init(const video_info_t *video,
|
|||||||
mode.width = 0;
|
mode.width = 0;
|
||||||
mode.height = 0;
|
mode.height = 0;
|
||||||
#ifdef VITA
|
#ifdef VITA
|
||||||
vglInitExtended(0x100000, 960, 544, 0x1000000, SCE_GXM_MULTISAMPLE_4X);
|
vglInitExtended(0x1400000, full_x, full_y, 0x1000000, SCE_GXM_MULTISAMPLE_4X);
|
||||||
|
vglUseVram(GL_TRUE);
|
||||||
|
vglStartRendering();
|
||||||
#endif
|
#endif
|
||||||
/* Clear out potential error flags in case we use cached context. */
|
/* Clear out potential error flags in case we use cached context. */
|
||||||
glGetError();
|
glGetError();
|
||||||
|
#ifndef VITA
|
||||||
if (string_is_equal(ctx_driver->ident, "null"))
|
if (string_is_equal(ctx_driver->ident, "null"))
|
||||||
goto error;
|
goto error;
|
||||||
|
#endif
|
||||||
RARCH_LOG("[GL1]: Detecting screen resolution %ux%u.\n", full_x, full_y);
|
RARCH_LOG("[GL1]: Detecting screen resolution %ux%u.\n", full_x, full_y);
|
||||||
|
|
||||||
win_width = video->width;
|
win_width = video->width;
|
||||||
@ -718,9 +720,7 @@ static bool gl1_gfx_frame(void *data, const void *frame,
|
|||||||
unsigned pot_height = 0;
|
unsigned pot_height = 0;
|
||||||
|
|
||||||
gl1_context_bind_hw_render(gl1, false);
|
gl1_context_bind_hw_render(gl1, false);
|
||||||
#ifdef VITA
|
|
||||||
vglStartRendering();
|
|
||||||
#endif
|
|
||||||
/* FIXME: Force these settings off as they interfere with the rendering */
|
/* FIXME: Force these settings off as they interfere with the rendering */
|
||||||
video_info->xmb_shadows_enable = false;
|
video_info->xmb_shadows_enable = false;
|
||||||
video_info->menu_shader_pipeline = 0;
|
video_info->menu_shader_pipeline = 0;
|
||||||
@ -927,9 +927,10 @@ static bool gl1_gfx_frame(void *data, const void *frame,
|
|||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
glFinish();
|
glFinish();
|
||||||
}
|
}
|
||||||
#ifdef VITA
|
#ifdef VITA
|
||||||
vglStopRendering();
|
vglStopRendering();
|
||||||
#endif
|
vglStartRendering();
|
||||||
|
#endif
|
||||||
gl1_context_bind_hw_render(gl1, true);
|
gl1_context_bind_hw_render(gl1, true);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -42,8 +42,13 @@ static void gfx_ctx_null_swap_buffers(void *data, void *data2)
|
|||||||
static void gfx_ctx_null_get_video_size(void *data, unsigned *width, unsigned *height)
|
static void gfx_ctx_null_get_video_size(void *data, unsigned *width, unsigned *height)
|
||||||
{
|
{
|
||||||
(void)data;
|
(void)data;
|
||||||
|
#ifdef VITA
|
||||||
|
*width = 960;
|
||||||
|
*height = 544;
|
||||||
|
#else
|
||||||
*width = 320;
|
*width = 320;
|
||||||
*height = 240;
|
*height = 240;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool gfx_ctx_null_set_video_mode(void *data,
|
static bool gfx_ctx_null_set_video_mode(void *data,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user