diff --git a/config/language/cn.msg b/config/language/cn.msg index 225771d62..110e42c8e 100644 --- a/config/language/cn.msg +++ b/config/language/cn.msg @@ -404,7 +404,7 @@ _help_language;Select the language to use in Attract-Mode's user interface _help_layout_file;Some layouts provide multiple layout*.nut files. Select which layout file to use _help_misc;Configure miscellaneous settings _help_mouse_threshold;The threshold for registering mouse moves, from 1 to 100 (100=least sensitive) -_help_multiple_monitors;Enable the use of multiple monitors by Attract-Mode +_help_multiple_monitors;Enable the use of multiple monitors by Attract-Mode. Setting this to 'No' may reduce screen flicker when launching games _help_plugin_command;The executable associated with this plug-in _help_plugin_enabled;Set whether this plug-in is enabled _help_plugin_sel;Configure plug-in @@ -431,6 +431,6 @@ _help_sound_sel;Assign a sound to this event/action _help_startup_mode;Set what should happen when Attract-Mode first starts up _help_track_usage;Configure whether Attract-Mode should track usage (played time and play count for each game) _help_video_decoder;Configure the decoder to use for video playback (if multiple decoders are available) -_help_volume;Valid volume settings are from 0 (mute) to 100 +_help_volume;Valid volume settings are from 0 (mute) to 100 _help_window_mode;Set whether Attract-Mode fills the screen or runs in a window _sort_regexp;^(Vs\. The |The |Vs\. ) diff --git a/config/language/de.msg b/config/language/de.msg index 31ad92d8b..cf19c57c7 100644 --- a/config/language/de.msg +++ b/config/language/de.msg @@ -412,7 +412,7 @@ _help_input_default_action;Set the default behaviour for this control _help_joystick_map;Map the frontend's joystick slots to specifically named joystick/gamepad devices attached to your computer (You can use this to force the frontend to always use 'Microsoft X-Box 360 pad' as Joystick 0, for example.) _help_language;Select the language to use in Attract-Mode's user interface _help_layout_file;Some layouts provide multiple layout*.nut files. Select which layout file to use -_help_multiple_monitors;Enable the use of multiple monitors by Attract-Mode +_help_multiple_monitors;Enable the use of multiple monitors by Attract-Mode. Setting this to 'No' may reduce screen flicker when launching games _help_shortcut_artwork_name_edit;Optionally provide an artwork name to be associated with this shortcut. The frontend will try to load artworks with this name when displaying the shortcut _help_shortcut_delete;Delete this shortcut from the Romlist _help_shortcut_label_edit;Edit this shortcut's label diff --git a/config/language/en.msg b/config/language/en.msg index 20098be95..e569b8808 100644 --- a/config/language/en.msg +++ b/config/language/en.msg @@ -123,7 +123,7 @@ _help_language;Select the language to use in Attract-Mode's user interface _help_layout_file;Some layouts provide multiple layout*.nut files. Select which layout file to use _help_misc;Configure miscellaneous settings _help_mouse_threshold;The threshold for registering mouse moves, from 1 to 100 (100=least sensitive) -_help_multiple_monitors;Enable the use of multiple monitors by Attract-Mode +_help_multiple_monitors;Enable the use of multiple monitors by Attract-Mode. Setting this to 'No' may reduce screen flicker when launching games _help_plugin_command;The executable associated with this plug-in _help_plugin_enabled;Set whether this plug-in is enabled _help_plugin_sel;Configure plug-in diff --git a/config/language/es.msg b/config/language/es.msg index c1ee657d8..b51da7170 100644 --- a/config/language/es.msg +++ b/config/language/es.msg @@ -413,7 +413,7 @@ _help_input_default_action;Set the default behaviour for this control _help_joystick_map;Map the frontend's joystick slots to specifically named joystick/gamepad devices attached to your computer (You can use this to force the frontend to always use 'Microsoft X-Box 360 pad' as Joystick 0, for example.) _help_language;Select the language to use in Attract-Mode's user interface _help_layout_file;Some layouts provide multiple layout*.nut files. Select which layout file to use -_help_multiple_monitors;Enable the use of multiple monitors by Attract-Mode +_help_multiple_monitors;Enable the use of multiple monitors by Attract-Mode. Setting this to 'No' may reduce screen flicker when launching games _help_shortcut_artwork_name_edit;Optionally provide an artwork name to be associated with this shortcut. The frontend will try to load artworks with this name when displaying the shortcut _help_shortcut_delete;Delete this shortcut from the Romlist _help_shortcut_label_edit;Edit this shortcut's label diff --git a/config/language/fr.msg b/config/language/fr.msg index 5146674d4..cba3dad23 100644 --- a/config/language/fr.msg +++ b/config/language/fr.msg @@ -416,7 +416,7 @@ _help_input_action; _help_input_default_action;Set the default behaviour for this control _help_joystick_map;Map the frontend's joystick slots to specifically named joystick/gamepad devices attached to your computer (You can use this to force the frontend to always use 'Microsoft X-Box 360 pad' as Joystick 0, for example.) _help_layout_file;Some layouts provide multiple layout*.nut files. Select which layout file to use -_help_multiple_monitors;Enable the use of multiple monitors by Attract-Mode +_help_multiple_monitors;Enable the use of multiple monitors by Attract-Mode. Setting this to 'No' may reduce screen flicker when launching games _help_shortcut_artwork_name_edit;Optionally provide an artwork name to be associated with this shortcut. The frontend will try to load artworks with this name when displaying the shortcut _help_shortcut_delete;Delete this shortcut from the Romlist _help_shortcut_label_edit;Edit this shortcut's label diff --git a/config/language/jp.msg b/config/language/jp.msg index ca601e152..e1f708505 100644 --- a/config/language/jp.msg +++ b/config/language/jp.msg @@ -413,7 +413,7 @@ _help_input_default_action;Set the default behaviour for this control _help_intro;Configure intro _help_joystick_map;Map the frontend's joystick slots to specifically named joystick/gamepad devices attached to your computer (You can use this to force the frontend to always use 'Microsoft X-Box 360 pad' as Joystick 0, for example.) _help_layout_file;Some layouts provide multiple layout*.nut files. Select which layout file to use -_help_multiple_monitors;Enable the use of multiple monitors by Attract-Mode +_help_multiple_monitors;Enable the use of multiple monitors by Attract-Mode. Setting this to 'No' may reduce screen flicker when launching games _help_scrape_vids;Set whether game videos should be downloaded when scraping _help_shortcut_artwork_name_edit;Optionally provide an artwork name to be associated with this shortcut. The frontend will try to load artworks with this name when displaying the shortcut _help_shortcut_delete;Delete this shortcut from the Romlist diff --git a/config/language/msg_template.txt b/config/language/msg_template.txt index 99b8ee8b0..ac66bf08d 100644 --- a/config/language/msg_template.txt +++ b/config/language/msg_template.txt @@ -360,7 +360,7 @@ _help_language;Select the language to use in Attract-Mode's user interface _help_layout_file;Some layouts provide multiple layout*.nut files. Select which layout file to use _help_misc;Configure miscellaneous settings _help_mouse_threshold;The threshold for registering mouse moves, from 1 to 100 (100=least sensitive) -_help_multiple_monitors;Enable the use of multiple monitors by Attract-Mode +_help_multiple_monitors;Enable the use of multiple monitors by Attract-Mode. Setting this to 'No' may reduce screen flicker when launching games _help_plugin_command;The executable associated with this plug-in _help_plugin_enabled;Set whether this plug-in is enabled _help_plugin_sel;Configure plug-in @@ -387,7 +387,7 @@ _help_sound_sel;Assign a sound to this event/action _help_startup_mode;Set what should happen when Attract-Mode first starts up _help_track_usage;Configure whether Attract-Mode should track usage (played time and play count for each game) _help_video_decoder;Configure the decoder to use for video playback (if multiple decoders are available) -_help_volume;Valid volume settings are from 0 (mute) to 100 +_help_volume;Valid volume settings are from 0 (mute) to 100 _help_window_mode;Set whether Attract-Mode fills the screen or runs in a window _help_hide_console;Hide console on startup. Note that this only works if starting Attract-Mode from a Windows GUI. If started from an existing console window (e.g. a batch file) then the process will always "attach" to the existing console and output to it. _sort_regexp;^(Vs\. The |The |Vs\. ) diff --git a/src/fe_settings.cpp b/src/fe_settings.cpp index 2a7cbb550..8b5dc1777 100644 --- a/src/fe_settings.cpp +++ b/src/fe_settings.cpp @@ -268,7 +268,7 @@ FeSettings::FeSettings( const std::string &config_path, m_confirm_favs( true ), m_confirm_exit( true ), m_track_usage( true ), - m_multimon( true ), + m_multimon( false ), #ifdef SFML_SYSTEM_LINUX m_window_mode( Fullscreen ), #else diff --git a/src/fe_window.cpp b/src/fe_window.cpp index 684467275..d150ebbd2 100644 --- a/src/fe_window.cpp +++ b/src/fe_window.cpp @@ -90,6 +90,12 @@ class FeWindowPosition : public FeBaseConfigurable } }; +bool is_multimon_config( FeSettings &fes ) +{ + return (( fes.get_info_bool( FeSettings::MultiMon ) ) + && ( !is_windowed_mode( fes.get_window_mode() ) )); +} + const char *FeWindowPosition::FILENAME = "window.am"; FeWindow::FeWindow( FeSettings &fes ) @@ -119,36 +125,18 @@ void FeWindow::onCreate() // SetWindowLongPtr( getSystemHandle(), GWL_STYLE, // WS_BORDER | WS_CLIPCHILDREN | WS_CLIPSIBLINGS ); // - int left, top, width, height; - if (( m_fes.get_info_bool( FeSettings::MultiMon ) ) - && ( !is_windowed_mode( m_fes.get_window_mode() ) )) + if ( is_multimon_config( m_fes ) ) { - left = GetSystemMetrics( SM_XVIRTUALSCREEN ); - top = GetSystemMetrics( SM_YVIRTUALSCREEN ); - width = GetSystemMetrics( SM_CXVIRTUALSCREEN ); - height = GetSystemMetrics( SM_CYVIRTUALSCREEN ); - } - else - { - left = getPosition().x; - top = getPosition().y; - width = getSize().x; - height = getSize().y; + // Note that as of 2.1, SFML caches the window size internally + setPosition( sf::Vector2i( + GetSystemMetrics( SM_XVIRTUALSCREEN ), + GetSystemMetrics( SM_YVIRTUALSCREEN ) ) ); + + setSize( sf::Vector2u( + GetSystemMetrics( SM_CXVIRTUALSCREEN ), + GetSystemMetrics( SM_CYVIRTUALSCREEN ) ) ); } - if ( m_fes.get_window_mode() == FeSettings::Default ) // "fill screen" mode - { - // resize the window off screen 1 pixel in each direction so we don't see the window border - left -= 1; - top -= 1; - width += 2; - height += 2; - } - - // As of 2.1, SFML caches the window size internally - setPosition( sf::Vector2i( left, top ) ); - setSize( sf::Vector2u( width, height ) ); - #elif defined(USE_XLIB) // // Notes: if xinerama and multimon are enabled, this should set our window to cover all available @@ -159,9 +147,10 @@ void FeWindow::onCreate() // int x, y, width, height; get_x11_geometry( - m_fes.get_info_bool( FeSettings::MultiMon ) && !is_windowed_mode( m_fes.get_window_mode() ), + is_multimon_config( m_fes ), x, y, width, height ); + // Note that as of 2.1, SFML caches the window size internally setPosition( sf::Vector2i( x, y ) ); setSize( sf::Vector2u( width, height ) ); @@ -188,7 +177,7 @@ void FeWindow::initial_create() int win_mode = m_fes.get_window_mode(); #ifdef USE_XINERAMA - if ( m_fes.get_info_bool( FeSettings::MultiMon ) && ( win_mode != FeSettings::Default )) + if ( is_multimon_config( m_fes ) && ( win_mode != FeSettings::Default )) FeLog() << " ! NOTE: Use the 'Fill Screen' window mode if you want multiple monitor support to function correctly" << std::endl; #endif @@ -220,11 +209,6 @@ void FeWindow::initial_create() #endif #ifdef SFML_SYSTEM_WINDOWS - // Fill Screen mode has an offset so the top row and the left column of the window is not visible. - // We call setView to compensate this -1,-1 offset of the window. - if ( win_mode == FeSettings::Default ) - setView(sf::View(sf::FloatRect(getPosition().x, getPosition().y, getSize().x, getSize().y))); - SetForegroundWindow( getSystemHandle() ); #endif @@ -286,7 +270,7 @@ void wait_callback( void *o ) } // Clear the frame buffer so there is no stale frame flashing on game launch/exit // Don't clear if Multimonitor is enabled and window mode is set to Fill Screen - if( !win->m_fes.get_info_bool( FeSettings::MultiMon ) || ( win->m_fes.get_window_mode() != FeSettings::Default ) ) + if ( !is_multimon_config( win->m_fes ) ) { win->clear(); win->display();