mirror of https://github.com/PCSX2/pcsx2.git
gsdx-osd: Ensure we set proper data for osd options.
Should avoid any potential issues if ini values are wrong for osd.
This commit is contained in:
parent
56b8612502
commit
888897ed48
|
@ -58,16 +58,16 @@ GSOsdManager::GSOsdManager() : m_atlas_h(0)
|
|||
, m_onscreen_messages(0)
|
||||
, m_texture_dirty(true)
|
||||
{
|
||||
m_log_enabled = theApp.GetConfigB("osd_log_enabled");
|
||||
m_log_timeout = std::max(2, std::min(theApp.GetConfigI("osd_log_timeout"), 10));
|
||||
m_monitor_enabled = theApp.GetConfigB("osd_monitor_enabled");
|
||||
m_opacity = std::max(0, std::min(theApp.GetConfigI("osd_color_opacity"), 100));
|
||||
m_max_onscreen_messages = theApp.GetConfigI("osd_max_log_messages");
|
||||
m_size = theApp.GetConfigI("osd_fontsize");
|
||||
m_monitor_enabled = theApp.GetConfigB("osd_monitor_enabled");
|
||||
m_log_enabled = theApp.GetConfigB("osd_log_enabled");
|
||||
m_size = std::max(1, std::min(theApp.GetConfigI("osd_fontsize"), 100));
|
||||
m_opacity = std::max(0, std::min(theApp.GetConfigI("osd_color_opacity"), 100));
|
||||
m_log_timeout = std::max(2, std::min(theApp.GetConfigI("osd_log_timeout"), 10));
|
||||
m_max_onscreen_messages = std::max(1, std::min(theApp.GetConfigI("osd_max_log_messages"), 20));
|
||||
|
||||
int r = theApp.GetConfigI("osd_color_r");
|
||||
int g = theApp.GetConfigI("osd_color_g");
|
||||
int b = theApp.GetConfigI("osd_color_b");
|
||||
int r = std::max(0, std::min(theApp.GetConfigI("osd_color_r"), 255));
|
||||
int g = std::max(0, std::min(theApp.GetConfigI("osd_color_g"), 255));
|
||||
int b = std::max(0, std::min(theApp.GetConfigI("osd_color_b"), 255));
|
||||
|
||||
m_color = r | (g << 8) | (b << 16) | (255 << 24);
|
||||
|
||||
|
|
Loading…
Reference in New Issue