mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +00:00
(CTR/3DS) don't turn off the LCD for 2DS models.
This commit is contained in:
parent
7798be9f6e
commit
71efe15bce
@ -192,6 +192,7 @@ static void frontend_ctr_deinit(void *data)
|
|||||||
{
|
{
|
||||||
extern PrintConsole* currentConsole;
|
extern PrintConsole* currentConsole;
|
||||||
Handle lcd_handle;
|
Handle lcd_handle;
|
||||||
|
u8 not_2DS;
|
||||||
(void)data;
|
(void)data;
|
||||||
#ifndef IS_SALAMANDER
|
#ifndef IS_SALAMANDER
|
||||||
global_t *global = global_get_ptr();
|
global_t *global = global_get_ptr();
|
||||||
@ -206,7 +207,8 @@ static void frontend_ctr_deinit(void *data)
|
|||||||
if(gfxBottomFramebuffers[0] == (u8*)currentConsole->frameBuffer)
|
if(gfxBottomFramebuffers[0] == (u8*)currentConsole->frameBuffer)
|
||||||
wait_for_input();
|
wait_for_input();
|
||||||
|
|
||||||
if(srvGetServiceHandle(&lcd_handle, "gsp::Lcd") >= 0)
|
CFGU_GetModelNintendo2DS(¬_2DS);
|
||||||
|
if(not_2DS && srvGetServiceHandle(&lcd_handle, "gsp::Lcd") >= 0)
|
||||||
{
|
{
|
||||||
u32 *cmdbuf = getThreadCommandBuffer();
|
u32 *cmdbuf = getThreadCommandBuffer();
|
||||||
cmdbuf[0] = 0x00110040;
|
cmdbuf[0] = 0x00110040;
|
||||||
@ -215,6 +217,7 @@ static void frontend_ctr_deinit(void *data)
|
|||||||
svcCloseHandle(lcd_handle);
|
svcCloseHandle(lcd_handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exitCfgu();
|
||||||
csndExit();
|
csndExit();
|
||||||
gfxExit();
|
gfxExit();
|
||||||
|
|
||||||
@ -255,6 +258,7 @@ static void frontend_ctr_init(void *data)
|
|||||||
#endif
|
#endif
|
||||||
gfxInit(GSP_BGR8_OES,GSP_RGB565_OES,false);
|
gfxInit(GSP_BGR8_OES,GSP_RGB565_OES,false);
|
||||||
csndInit();
|
csndInit();
|
||||||
|
initCfgu();
|
||||||
gfxSet3D(false);
|
gfxSet3D(false);
|
||||||
consoleInit(GFX_BOTTOM, NULL);
|
consoleInit(GFX_BOTTOM, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
@ -393,12 +393,14 @@ static bool ctr_frame(void* data, const void* frame,
|
|||||||
if((state_tmp & KEY_TOUCH) && (state_tmp_touch.py < 120))
|
if((state_tmp & KEY_TOUCH) && (state_tmp_touch.py < 120))
|
||||||
{
|
{
|
||||||
Handle lcd_handle;
|
Handle lcd_handle;
|
||||||
|
u8 not_2DS;
|
||||||
extern PrintConsole* currentConsole;
|
extern PrintConsole* currentConsole;
|
||||||
|
|
||||||
gfxBottomFramebuffers[0] = ctr->lcd_buttom_on ? (u8*)ctr->empty_framebuffer:
|
gfxBottomFramebuffers[0] = ctr->lcd_buttom_on ? (u8*)ctr->empty_framebuffer:
|
||||||
(u8*)currentConsole->frameBuffer;
|
(u8*)currentConsole->frameBuffer;
|
||||||
|
|
||||||
if(srvGetServiceHandle(&lcd_handle, "gsp::Lcd") >= 0)
|
CFGU_GetModelNintendo2DS(¬_2DS);
|
||||||
|
if(not_2DS && srvGetServiceHandle(&lcd_handle, "gsp::Lcd") >= 0)
|
||||||
{
|
{
|
||||||
u32 *cmdbuf = getThreadCommandBuffer();
|
u32 *cmdbuf = getThreadCommandBuffer();
|
||||||
cmdbuf[0] = ctr->lcd_buttom_on? 0x00120040: 0x00110040;
|
cmdbuf[0] = ctr->lcd_buttom_on? 0x00120040: 0x00110040;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user