(RARCH_CONSOLE) Expand console_settings.c some more

This commit is contained in:
Twinaphex 2012-05-29 01:37:09 +02:00
parent e0b85596f6
commit e49e23687a
3 changed files with 22 additions and 6 deletions

View File

@ -26,6 +26,12 @@ void rarch_settings_change(unsigned setting)
{ {
switch(setting) switch(setting)
{ {
case S_HW_TEXTURE_FILTER:
g_settings.video.smooth = !g_settings.video.smooth;
break;
case S_HW_TEXTURE_FILTER_2:
g_settings.video.second_pass_smooth = !g_settings.video.second_pass_smooth;
break;
case S_OVERSCAN_DECREMENT: case S_OVERSCAN_DECREMENT:
g_console.overscan_amount -= 0.01f; g_console.overscan_amount -= 0.01f;
g_console.overscan_enable = true; g_console.overscan_enable = true;
@ -79,6 +85,12 @@ void rarch_settings_default(unsigned setting)
{ {
switch(setting) switch(setting)
{ {
case S_DEF_HW_TEXTURE_FILTER:
g_settings.video.smooth = 1;
break;
case S_DEF_HW_TEXTURE_FILTER_2:
g_settings.video.second_pass_smooth = 1;
break;
case S_DEF_OVERSCAN: case S_DEF_OVERSCAN:
g_console.overscan_amount = 0.0f; g_console.overscan_amount = 0.0f;
g_console.overscan_enable = false; g_console.overscan_enable = false;

View File

@ -19,7 +19,9 @@
enum enum
{ {
S_OVERSCAN_DECREMENT = 0, S_HW_TEXTURE_FILTER = 0,
S_HW_TEXTURE_FILTER_2,
S_OVERSCAN_DECREMENT,
S_OVERSCAN_INCREMENT, S_OVERSCAN_INCREMENT,
S_ROTATION_DECREMENT, S_ROTATION_DECREMENT,
S_ROTATION_INCREMENT, S_ROTATION_INCREMENT,
@ -34,7 +36,9 @@ enum
enum enum
{ {
S_DEF_OVERSCAN = 0, S_DEF_HW_TEXTURE_FILTER = 0,
S_DEF_HW_TEXTURE_FILTER_2,
S_DEF_OVERSCAN,
S_DEF_THROTTLE, S_DEF_THROTTLE,
S_DEF_TRIPLE_BUFFERING, S_DEF_TRIPLE_BUFFERING,
S_DEF_SAVE_STATE, S_DEF_SAVE_STATE,

View File

@ -1318,26 +1318,26 @@ static void producesettingentry(menu * menu_obj, uint64_t switchvalue)
case SETTING_HW_TEXTURE_FILTER: case SETTING_HW_TEXTURE_FILTER:
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state)) if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
{ {
g_settings.video.smooth = !g_settings.video.smooth; rarch_settings_change(S_HW_TEXTURE_FILTER);
gfx_ctx_set_filtering(1, g_settings.video.smooth); gfx_ctx_set_filtering(1, g_settings.video.smooth);
set_delay = DELAY_LONG; set_delay = DELAY_LONG;
} }
if(CTRL_START(state)) if(CTRL_START(state))
{ {
g_settings.video.smooth = 1; rarch_settings_change(S_DEF_HW_TEXTURE_FILTER);
gfx_ctx_set_filtering(1, g_settings.video.smooth); gfx_ctx_set_filtering(1, g_settings.video.smooth);
} }
break; break;
case SETTING_HW_TEXTURE_FILTER_2: case SETTING_HW_TEXTURE_FILTER_2:
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state)) if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) || CTRL_CROSS(state))
{ {
g_settings.video.second_pass_smooth = !g_settings.video.second_pass_smooth; rarch_settings_change(S_HW_TEXTURE_FILTER_2);
gfx_ctx_set_filtering(2, g_settings.video.second_pass_smooth); gfx_ctx_set_filtering(2, g_settings.video.second_pass_smooth);
set_delay = DELAY_LONG; set_delay = DELAY_LONG;
} }
if(CTRL_START(state)) if(CTRL_START(state))
{ {
g_settings.video.second_pass_smooth = 1; rarch_settings_change(S_DEF_HW_TEXTURE_FILTER_2);
gfx_ctx_set_filtering(2, g_settings.video.second_pass_smooth); gfx_ctx_set_filtering(2, g_settings.video.second_pass_smooth);
} }
break; break;