(3DS) use touch for menu toggle.

keep console visible on exit until start is pressed.
This commit is contained in:
aliaspider 2015-04-05 20:39:18 +01:00
parent 2adab38d8e
commit 14ac3fe250
2 changed files with 17 additions and 32 deletions

View File

@ -120,6 +120,8 @@ static void frontend_ctr_deinit(void *data)
global->log_file = NULL;
#endif
wait_for_input();
gfxExit();
// sdmcExit();
// fsExit();
@ -134,13 +136,6 @@ static void frontend_ctr_shutdown(bool unused)
(void)unused;
}
static int exit_callback(int arg1, int arg2, void *common)
{
frontend_ctr_deinit(NULL);
frontend_ctr_shutdown(false);
return 0;
}
#define PRINTFPOS(X,Y) "\x1b["#X";"#Y"H"
#define PRINTFPOS_STR(X,Y) "\x1b["X";"Y"H"
static void frontend_ctr_init(void *data)
@ -150,23 +145,10 @@ static void frontend_ctr_init(void *data)
global_t *global = global_get_ptr();
global->verbosity = true;
gfxInitDefault();
// gfxInitDefault();
gfxInit(GSP_BGR8_OES,GSP_RGB565_OES,false);
gfxSet3D(false);
consoleInit(GFX_BOTTOM, NULL);
// consoleInit(GFX_BOTTOM, NULL);
// gfxInitDefault();
// gfxInit(GSP_RGBA8_OES,GSP_RGBA8_OES,false);
// gfxSet3D(false);
// consoleInit(GFX_BOTTOM, NULL);
// printf(PRINTFPOS(0,0)"3ds_test");
// printf(PRINTFPOS(0,1)"Press Start to exit.");
// gfxFlushBuffers();
// gfxSwapBuffers();
#endif
}
@ -174,12 +156,12 @@ static void frontend_ctr_init(void *data)
static int frontend_ctr_get_rating(void)
{
return 4;
return 3;
}
bool select_pressed = false;
void wait_for_input()
{
printf("Press Start.\n\n\n\n");fflush(stdout);
printf("\n\nPress Start.\n\n");fflush(stdout);
while(aptMainLoop())
{
hidScanInput();

View File

@ -17,7 +17,7 @@
#include "../../general.h"
#include "../../driver.h"
#include "retroarch.h"
static uint32_t kDown;
static int16_t pad_state;
@ -53,13 +53,16 @@ static void ctr_input_poll(void *data)
*lifecycle_state &= ~((1ULL << RARCH_MENU_TOGGLE));
if (
(pad_state & (1ULL << RETRO_DEVICE_ID_JOYPAD_L))
&& (pad_state & (1ULL << RETRO_DEVICE_ID_JOYPAD_R))
&& (pad_state & (1ULL << RETRO_DEVICE_ID_JOYPAD_SELECT))
&& (pad_state & (1ULL << RETRO_DEVICE_ID_JOYPAD_START))
)
*lifecycle_state |= (1ULL << RARCH_MENU_TOGGLE);
if(kDown & KEY_TOUCH)
*lifecycle_state |= (1ULL << RARCH_MENU_TOGGLE);
/* panic button */
if((kDown & KEY_START) &&
(kDown & KEY_SELECT) &&
(kDown & KEY_L) &&
(kDown & KEY_R))
rarch_main_command(RARCH_CMD_QUIT);
}
static int16_t ctr_input_state(void *data,