Take out obsolete console-style overscan options - just use

Resize Mode instead
This commit is contained in:
twinaphex 2013-04-07 01:22:47 +02:00
parent 20d1fba464
commit 909122122d
9 changed files with 0 additions and 125 deletions

View File

@ -447,9 +447,6 @@ static void render_text(rgui_handle_t *rgui)
case RGUI_SETTINGS_VIDEO_ASPECT_RATIO:
strlcpy(type_str, aspectratio_lut[g_settings.video.aspect_ratio_idx].name, sizeof(type_str));
break;
case RGUI_SETTINGS_VIDEO_OVERSCAN:
snprintf(type_str, sizeof(type_str), "%.2f", g_extern.console.screen.overscan_amount);
break;
case RGUI_SETTINGS_VIDEO_ROTATION:
snprintf(type_str, sizeof(type_str), "Rotation: %s",
rotation_lut[g_extern.console.screen.orientation]);
@ -796,26 +793,6 @@ static int rgui_settings_toggle_setting(unsigned setting, rgui_action_t action,
video_set_rotation_func(g_extern.console.screen.orientation);
}
break;
case RGUI_SETTINGS_VIDEO_OVERSCAN:
if (action == RGUI_ACTION_START)
{
settings_set(1ULL << S_DEF_OVERSCAN);
if (driver.video_poke->apply_state_changes)
driver.video_poke->apply_state_changes(driver.video_data);
}
else if (action == RGUI_ACTION_LEFT)
{
settings_set(1ULL << S_OVERSCAN_DECREMENT);
if (driver.video_poke->apply_state_changes)
driver.video_poke->apply_state_changes(driver.video_data);
}
else if (action == RGUI_ACTION_RIGHT)
{
settings_set(1ULL << S_OVERSCAN_INCREMENT);
if (driver.video_poke->apply_state_changes)
driver.video_poke->apply_state_changes(driver.video_data);
}
break;
case RGUI_SETTINGS_AUDIO_MUTE:
if (action == RGUI_ACTION_START)
settings_set(1ULL << S_DEF_AUDIO_MUTE);
@ -1050,7 +1027,6 @@ static void rgui_settings_populate_entries(rgui_handle_t *rgui)
#endif
rgui_list_push(rgui->selection_buf, "Aspect Ratio", RGUI_SETTINGS_VIDEO_ASPECT_RATIO, 0);
rgui_list_push(rgui->selection_buf, "Custom Ratio", RGUI_SETTINGS_CUSTOM_VIEWPORT, 0);
rgui_list_push(rgui->selection_buf, "Overscan", RGUI_SETTINGS_VIDEO_OVERSCAN, 0);
rgui_list_push(rgui->selection_buf, "Rotation", RGUI_SETTINGS_VIDEO_ROTATION, 0);
rgui_list_push(rgui->selection_buf, "Mute Audio", RGUI_SETTINGS_AUDIO_MUTE, 0);
rgui_list_push(rgui->selection_buf, "Audio Control Rate", RGUI_SETTINGS_AUDIO_CONTROL_RATE, 0);

View File

@ -54,7 +54,6 @@ typedef enum
RGUI_SETTINGS_VIDEO_ASPECT_RATIO,
RGUI_SETTINGS_CUSTOM_VIEWPORT,
RGUI_SETTINGS_CUSTOM_VIEWPORT_2,
RGUI_SETTINGS_VIDEO_OVERSCAN,
RGUI_SETTINGS_VIDEO_ROTATION,
RGUI_SETTINGS_AUDIO_MUTE,
RGUI_SETTINGS_AUDIO_CONTROL_RATE,

View File

@ -495,11 +495,6 @@ static void populate_setting_item(void *data, unsigned input)
strlcpy(current_item->comment, "INFO - Toggle the [Soft Display Filter].", sizeof(current_item->comment));
break;
#endif
case SETTING_HW_OVERSCAN_AMOUNT:
strlcpy(current_item->text, "Overscan", sizeof(current_item->text));
snprintf(current_item->setting_text, sizeof(current_item->setting_text), "%f", g_extern.console.screen.overscan_amount);
strlcpy(current_item->comment, "INFO - Adjust or decrease [Overscan]. Set this to higher than 0.000\nif the screen doesn't fit on your TV/monitor.", sizeof(current_item->comment));
break;
case SETTING_REFRESH_RATE:
strlcpy(current_item->text, "Refresh rate", sizeof(current_item->text));
snprintf(current_item->setting_text, sizeof(current_item->setting_text), "%fHz", g_settings.video.refresh_rate);
@ -804,11 +799,6 @@ static void populate_setting_item(void *data, unsigned input)
strlcpy(current_item->setting_text, aspectratio_lut[g_settings.video.aspect_ratio_idx].name, sizeof(current_item->setting_text));
strlcpy(current_item->comment, "Change the aspect ratio of the screen.", sizeof(current_item->comment));
break;
case INGAME_MENU_OVERSCAN:
strlcpy(current_item->text, "Overscan", sizeof(current_item->text));
snprintf(current_item->setting_text, sizeof(current_item->setting_text), "%f", g_extern.console.screen.overscan_amount);
strlcpy(current_item->comment, "Change overscan correction.", sizeof(current_item->comment));
break;
case INGAME_MENU_ROTATION:
strlcpy(current_item->text, "Rotation", sizeof(current_item->text));
strlcpy(current_item->setting_text, rotation_lut[g_extern.console.screen.orientation], sizeof(current_item->setting_text));
@ -1729,29 +1719,6 @@ static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t
g_extern.lifecycle_mode_state |= (1ULL << MODE_VIDEO_SOFT_FILTER_ENABLE);
break;
#endif
case SETTING_HW_OVERSCAN_AMOUNT:
if (input & (1ULL << RMENU_DEVICE_NAV_LEFT))
{
settings_set(1ULL << S_OVERSCAN_DECREMENT);
if (driver.video_poke->apply_state_changes)
driver.video_poke->apply_state_changes(driver.video_data);
}
if ((input & (1ULL << RMENU_DEVICE_NAV_RIGHT)) || (input & (1ULL << RMENU_DEVICE_NAV_B)))
{
settings_set(1ULL << S_OVERSCAN_INCREMENT);
if (driver.video_poke->apply_state_changes)
driver.video_poke->apply_state_changes(driver.video_data);
}
if (input & (1ULL << RMENU_DEVICE_NAV_START))
{
settings_set(1ULL << S_DEF_OVERSCAN);
if (driver.video_poke->apply_state_changes)
driver.video_poke->apply_state_changes(driver.video_data);
}
break;
case SETTING_REFRESH_RATE:
if (input & (1ULL << RMENU_DEVICE_NAV_LEFT))
{

View File

@ -107,7 +107,6 @@ enum
SETTING_FLICKER_FILTER,
SETTING_SOFT_DISPLAY_FILTER,
#endif
SETTING_HW_OVERSCAN_AMOUNT,
SETTING_REFRESH_RATE,
SETTING_THROTTLE_MODE,
SETTING_TRIPLE_BUFFERING,
@ -175,7 +174,6 @@ enum
INGAME_MENU_LOAD_STATE,
INGAME_MENU_SAVE_STATE,
INGAME_MENU_ASPECT_RATIO,
INGAME_MENU_OVERSCAN,
INGAME_MENU_ROTATION,
INGAME_MENU_RESIZE_MODE,
INGAME_MENU_FRAME_ADVANCE,

View File

@ -133,7 +133,6 @@ enum menu_enums
MODE_VIDEO_SOFT_FILTER_ENABLE,
MODE_VIDEO_SCREENSHOTS_ENABLE,
MODE_VIDEO_THROTTLE_ENABLE,
MODE_VIDEO_OVERSCAN_ENABLE,
MODE_VIDEO_PAL_ENABLE,
MODE_VIDEO_PAL_TEMPORAL_ENABLE,
MODE_VIDEO_PAL_VSYNC_BLOCK,
@ -565,7 +564,6 @@ struct global
} viewports;
unsigned orientation;
float overscan_amount;
unsigned gamma_correction;
unsigned char flicker_filter_index;
unsigned char soft_filter_index;
@ -639,8 +637,6 @@ enum
S_FRAME_ADVANCE,
S_HW_TEXTURE_FILTER,
S_HW_TEXTURE_FILTER_2,
S_OVERSCAN_DECREMENT,
S_OVERSCAN_INCREMENT,
S_RESOLUTION_PREVIOUS,
S_RESOLUTION_NEXT,
S_ROTATION_DECREMENT,
@ -662,7 +658,6 @@ enum
S_DEF_AUDIO_CONTROL_RATE,
S_DEF_HW_TEXTURE_FILTER,
S_DEF_HW_TEXTURE_FILTER_2,
S_DEF_OVERSCAN,
S_DEF_ROTATION,
S_DEF_THROTTLE,
S_DEF_TRIPLE_BUFFERING,

View File

@ -792,12 +792,6 @@ bool gl_init_hw_render(gl_t *gl, unsigned width, unsigned height)
void gl_set_projection(void *data, struct gl_ortho *ortho, bool allow_rotate)
{
gl_t *gl = (gl_t*)data;
if (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_OVERSCAN_ENABLE))
{
ortho->left = -g_extern.console.screen.overscan_amount / 2;
ortho->right = 1 + g_extern.console.screen.overscan_amount / 2;
ortho->bottom = -g_extern.console.screen.overscan_amount / 2;
}
// Calculate projection.
matrix_ortho(&gl->mvp_no_rot, ortho->left, ortho->right,

View File

@ -761,13 +761,6 @@ static void gx_resize(void *data)
Mtx44 m1, m2;
float top = 1, bottom = -1, left = -1, right = 1;
if (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_OVERSCAN_ENABLE))
{
top -= g_extern.console.screen.overscan_amount / 2;
left += g_extern.console.screen.overscan_amount / 2;
right -= g_extern.console.screen.overscan_amount / 2;
bottom += g_extern.console.screen.overscan_amount / 2;
}
guOrtho(m1, top, bottom, left, right, 0, 1);
GX_LoadPosMtxImm(m1, GX_PNMTX1);

View File

@ -253,9 +253,7 @@ void config_set_defaults(void)
// g_extern
strlcpy(g_extern.console.main_wrap.default_sram_dir, default_paths.sram_dir, sizeof(g_extern.console.main_wrap.default_sram_dir));
g_extern.console.screen.overscan_amount = 0.0f;
g_extern.console.screen.gamma_correction = DEFAULT_GAMMA;
g_extern.lifecycle_mode_state |= (1ULL << MODE_VIDEO_OVERSCAN_ENABLE);
g_extern.lifecycle_mode_state |= (1ULL << MODE_AUDIO_CUSTOM_BGM_ENABLE);
g_extern.lifecycle_mode_state |= (1ULL << MODE_VIDEO_SCREENSHOTS_ENABLE);
g_extern.lifecycle_mode_state |= (1ULL << MODE_VIDEO_THROTTLE_ENABLE);
@ -474,7 +472,6 @@ bool config_load_file(const char *path)
bool throttle_enable = false;
bool triple_buffering_enable = false;
bool custom_bgm_enable = false;
bool overscan_enable = false;
bool screenshots_enable = false;
bool flicker_filter_enable = false;
bool soft_filter_enable = false;
@ -520,14 +517,6 @@ bool config_load_file(const char *path)
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_VIDEO_TRIPLE_BUFFERING_ENABLE);
}
if (config_get_bool(conf, "overscan_enable", &overscan_enable))
{
if (overscan_enable)
g_extern.lifecycle_mode_state |= (1ULL << MODE_VIDEO_OVERSCAN_ENABLE);
else
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_VIDEO_OVERSCAN_ENABLE);
}
if (config_get_bool(conf, "custom_bgm_enable", &custom_bgm_enable))
{
if (custom_bgm_enable)
@ -576,7 +565,6 @@ bool config_load_file(const char *path)
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_LOAD_GAME_STATE_DIR_ENABLE);
}
CONFIG_GET_FLOAT_EXTERN(console.screen.overscan_amount, "overscan_amount");
CONFIG_GET_INT_EXTERN(console.screen.flicker_filter_index, "flicker_filter_index");
CONFIG_GET_INT_EXTERN(console.screen.soft_filter_index, "soft_filter_index");
#ifdef _XBOX1
@ -1196,11 +1184,6 @@ bool config_save_file(const char *path)
config_set_int(conf, "rmenu_low_ram_mode_enable", 0);
#endif
if (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_OVERSCAN_ENABLE))
config_set_bool(conf, "overscan_enable", true);
else
config_set_bool(conf, "overscan_enable", false);
if (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_SCREENSHOTS_ENABLE))
config_set_bool(conf, "screenshots_enable", true);
else
@ -1246,7 +1229,6 @@ bool config_save_file(const char *path)
#ifdef HAVE_RMENU
config_set_string(conf, "menu_texture_path", g_extern.console.menu_texture_path);
#endif
config_set_float(conf, "overscan_amount", g_extern.console.screen.overscan_amount);
config_set_float(conf, "video_font_size", g_settings.video.font_size);
// g_extern
@ -1345,22 +1327,6 @@ void settings_set(uint64_t settings)
if (settings & (1ULL << S_HW_TEXTURE_FILTER))
g_settings.video.smooth = !g_settings.video.smooth;
if (settings & (1ULL << S_OVERSCAN_DECREMENT))
{
g_extern.console.screen.overscan_amount -= 0.01f;
g_extern.lifecycle_mode_state |= (1ULL << MODE_VIDEO_OVERSCAN_ENABLE);
if(g_extern.console.screen.overscan_amount == 0.0f)
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_VIDEO_OVERSCAN_ENABLE);
}
if (settings & (1ULL << S_OVERSCAN_INCREMENT))
{
g_extern.console.screen.overscan_amount += 0.01f;
g_extern.lifecycle_mode_state |= (1ULL << MODE_VIDEO_OVERSCAN_ENABLE);
if(g_extern.console.screen.overscan_amount == 0.0f)
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_VIDEO_OVERSCAN_ENABLE);
}
if (settings & (1ULL << S_RESOLUTION_PREVIOUS))
{
if (g_extern.console.screen.resolutions.current.idx)
@ -1462,12 +1428,6 @@ void settings_set(uint64_t settings)
if (settings & (1ULL << S_DEF_HW_TEXTURE_FILTER))
g_settings.video.smooth = video_smooth;
if (settings & (1ULL << S_DEF_OVERSCAN))
{
g_extern.console.screen.overscan_amount = 0.0f;
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_VIDEO_OVERSCAN_ENABLE);
}
if (settings & (1ULL << S_DEF_ROTATION))
g_extern.console.screen.orientation = ORIENTATION_NORMAL;

View File

@ -274,13 +274,6 @@ static void xdk_d3d_set_viewport(bool force_full)
font_x = vp.X;
font_y = vp.Y;
#endif
//if (gl->overscan_enable && !force_full)
//{
// m_left = -gl->overscan_amount/2;
// m_right = 1 + gl->overscan_amount/2;
// m_bottom = -gl->overscan_amount/2;
//}
}
static void xdk_d3d_set_rotation(void *data, unsigned orientation)