(Main) Take out HAVE_SCREENSHOTS ifdef

Create RARCH_CMD_TAKE_SCREENSHOT
This commit is contained in:
twinaphex 2014-07-22 03:17:47 +02:00
parent 78610e4d90
commit 72be4b17e7
4 changed files with 6 additions and 10 deletions

View File

@ -3824,12 +3824,10 @@ static int menu_common_setting_set(unsigned setting, unsigned action)
else if (action == MENU_ACTION_RIGHT)
g_extern.state_slot++;
break;
#ifdef HAVE_SCREENSHOTS
case MENU_SETTINGS_SCREENSHOT:
if (action == MENU_ACTION_OK)
rarch_take_screenshot();
rarch_main_command(RARCH_CMD_TAKE_SCREENSHOT);
break;
#endif
case MENU_SETTINGS_RESTART_GAME:
if (action == MENU_ACTION_OK)
{

View File

@ -368,7 +368,7 @@ static int menu_lakka_iterate(unsigned action)
return -1;
break;
case 3:
rarch_take_screenshot();
rarch_main_command(RARCH_CMD_TAKE_SCREENSHOT);
break;
case 4:
global_alpha = 0.0;

View File

@ -93,6 +93,7 @@ enum basic_event
RARCH_CMD_LOAD_CONTENT,
RARCH_CMD_LOAD_STATE,
RARCH_CMD_SAVE_STATE,
RARCH_CMD_TAKE_SCREENSHOT,
RARCH_CMD_QUIT,
};

View File

@ -78,7 +78,6 @@ static void check_fast_forward_button(void)
old_hold_button_state = new_hold_button_state;
}
#if defined(HAVE_SCREENSHOTS) && !defined(_XBOX1)
static bool take_screenshot_viewport(void)
{
struct rarch_viewport vp = {0};
@ -192,7 +191,6 @@ void rarch_take_screenshot(void)
else
msg_queue_push(g_extern.msg_queue, msg, 1, 180);
}
#endif
static void readjust_audio_input_rate(void)
{
@ -2601,7 +2599,6 @@ static void check_disk(void)
old_pressed_next = pressed_next;
}
#if defined(HAVE_SCREENSHOTS) && !defined(_XBOX)
static void check_screenshot(void)
{
static bool old_pressed;
@ -2611,7 +2608,6 @@ static void check_screenshot(void)
old_pressed = pressed;
}
#endif
static void check_mute(void)
{
@ -2742,9 +2738,7 @@ static void do_state_checks(void)
{
rarch_check_block_hotkey();
#if defined(HAVE_SCREENSHOTS) && !defined(_XBOX)
check_screenshot();
#endif
check_mute();
check_volume();
@ -3103,6 +3097,9 @@ void rarch_main_command(unsigned action)
case RARCH_CMD_SAVE_STATE:
rarch_save_state();
break;
case RARCH_CMD_TAKE_SCREENSHOT:
rarch_take_screenshot();
break;
case RARCH_CMD_QUIT:
g_extern.system.shutdown = true;
break;