Compare commits

...

1 Commits

Author SHA1 Message Date
skymike03
920914b374 v2.4.0.1 (2026.01.07 bis)
- remove windowed mode (useless)
2026-01-07 14:36:00 +01:00
4 changed files with 38 additions and 104 deletions

View File

@@ -13,7 +13,7 @@ except Exception:
pygame = None # type: ignore
# Version actuelle de l'application
app_version = "2.4.0.0"
app_version = "2.4.0.1"
def get_application_root():

View File

@@ -1755,10 +1755,8 @@ def handle_controls(event, sources, joystick, screen):
# Sous-menu Display
elif config.menu_state == "pause_display_menu":
sel = getattr(config, 'pause_display_selection', 0)
# Windows: layout, font size, footer font size, font family, monitor, mode, light, allow unknown extensions, back (9)
# Linux: layout, font size, footer font size, font family, monitor, light, allow unknown extensions, back (8)
is_windows = config.OPERATING_SYSTEM == "Windows"
total = 9 if is_windows else 8
# layout, font size, footer font size, font family, monitor, light, allow unknown extensions, back (8)
total = 8
if is_input_matched(event, "up"):
config.pause_display_selection = (sel - 1) % total
config.needs_redraw = True
@@ -1871,71 +1869,29 @@ def handle_controls(event, sources, joystick, screen):
config.needs_redraw = True
except Exception as e:
logger.error(f"Erreur changement moniteur: {e}")
# 5 fullscreen/windowed toggle (Windows) or light mode (Linux)
# 5 light mode toggle
elif sel == 5 and (is_input_matched(event, "left") or is_input_matched(event, "right") or is_input_matched(event, "confirm")):
if is_windows:
# Fullscreen/windowed toggle
try:
from rgsx_settings import get_display_fullscreen, set_display_fullscreen
current = get_display_fullscreen()
new_val = set_display_fullscreen(not current)
config.popup_message = _("display_mode_restart_required") if _ else "Restart required to apply screen mode"
config.popup_timer = 3000
config.needs_redraw = True
except Exception as e:
logger.error(f"Erreur toggle fullscreen: {e}")
else:
# Linux: light mode toggle
try:
from rgsx_settings import get_light_mode, set_light_mode
current = get_light_mode()
new_val = set_light_mode(not current)
config.popup_message = _("display_light_mode_enabled") if new_val else _("display_light_mode_disabled")
config.popup_timer = 2000
config.needs_redraw = True
except Exception as e:
logger.error(f"Erreur toggle light mode: {e}")
# 6 light mode (Windows) or allow unknown extensions (Linux)
elif sel == 6 and (is_input_matched(event, "left") or is_input_matched(event, "right") or is_input_matched(event, "confirm")):
if is_windows:
# Windows: light mode toggle
try:
from rgsx_settings import get_light_mode, set_light_mode
current = get_light_mode()
new_val = set_light_mode(not current)
config.popup_message = _("display_light_mode_enabled") if new_val else _("display_light_mode_disabled")
config.popup_timer = 2000
config.needs_redraw = True
except Exception as e:
logger.error(f"Erreur toggle light mode: {e}")
else:
# Linux: allow unknown extensions
try:
current = get_allow_unknown_extensions()
new_val = set_allow_unknown_extensions(not current)
config.popup_message = _("menu_allow_unknown_ext_enabled") if new_val else _("menu_allow_unknown_ext_disabled")
config.popup_timer = 3000
config.needs_redraw = True
except Exception as e:
logger.error(f"Erreur toggle allow_unknown_extensions: {e}")
# 7 allow unknown extensions (Windows) or back (Linux)
elif sel == 7:
if is_windows and (is_input_matched(event, "left") or is_input_matched(event, "right") or is_input_matched(event, "confirm")):
try:
current = get_allow_unknown_extensions()
new_val = set_allow_unknown_extensions(not current)
config.popup_message = _("menu_allow_unknown_ext_enabled") if new_val else _("menu_allow_unknown_ext_disabled")
config.popup_timer = 3000
config.needs_redraw = True
except Exception as e:
logger.error(f"Erreur toggle allow_unknown_extensions: {e}")
elif not is_windows and is_input_matched(event, "confirm"):
# Linux: back
config.menu_state = "pause_menu"
config.last_state_change_time = pygame.time.get_ticks()
try:
from rgsx_settings import get_light_mode, set_light_mode
current = get_light_mode()
new_val = set_light_mode(not current)
config.popup_message = _("display_light_mode_enabled") if new_val else _("display_light_mode_disabled")
config.popup_timer = 2000
config.needs_redraw = True
# 8 back (Windows only)
elif sel == 8 and is_windows and is_input_matched(event, "confirm"):
except Exception as e:
logger.error(f"Erreur toggle light mode: {e}")
# 6 allow unknown extensions
elif sel == 6 and (is_input_matched(event, "left") or is_input_matched(event, "right") or is_input_matched(event, "confirm")):
try:
current = get_allow_unknown_extensions()
new_val = set_allow_unknown_extensions(not current)
config.popup_message = _("menu_allow_unknown_ext_enabled") if new_val else _("menu_allow_unknown_ext_disabled")
config.popup_timer = 3000
config.needs_redraw = True
except Exception as e:
logger.error(f"Erreur toggle allow_unknown_extensions: {e}")
# 7 back
elif sel == 7 and is_input_matched(event, "confirm"):
config.menu_state = "pause_menu"
config.last_state_change_time = pygame.time.get_ticks()
config.needs_redraw = True

View File

@@ -2465,13 +2465,6 @@ def draw_pause_display_menu(screen, selected_index):
monitor_value = _('display_monitor_single') if _ else "Single monitor"
monitor_txt = f"{_('display_monitor') if _ else 'Monitor'}: < {monitor_value} >"
# Fullscreen/Windowed (Windows only)
is_windows = config.OPERATING_SYSTEM == "Windows"
if is_windows:
is_fullscreen = get_display_fullscreen()
mode_value = _('display_fullscreen') if is_fullscreen else _('display_windowed')
mode_txt = f"{_('display_mode') if _ else 'Screen mode'}: < {mode_value} >"
# Allow unknown extensions
allow_unknown = get_allow_unknown_extensions()
status_unknown = _('status_on') if allow_unknown else _('status_off')
@@ -2487,34 +2480,19 @@ def draw_pause_display_menu(screen, selected_index):
back_txt = _("menu_back") if _ else "Back"
# Build options list - mode only on Windows
# Windows: layout, font, footer, family, monitor, mode, light, unknown, back (9)
# Linux: layout, font, footer, family, monitor, light, unknown, back (8)
if is_windows:
options = [layout_txt, font_txt, footer_font_txt, font_family_txt, monitor_txt, mode_txt, light_txt, unknown_txt, back_txt]
instruction_keys = [
"instruction_display_layout",
"instruction_display_font_size",
"instruction_display_footer_font_size",
"instruction_display_font_family",
"instruction_display_monitor",
"instruction_display_mode",
"instruction_display_light_mode",
"instruction_display_unknown_ext",
"instruction_generic_back",
]
else:
options = [layout_txt, font_txt, footer_font_txt, font_family_txt, monitor_txt, light_txt, unknown_txt, back_txt]
instruction_keys = [
"instruction_display_layout",
"instruction_display_font_size",
"instruction_display_footer_font_size",
"instruction_display_font_family",
"instruction_display_monitor",
"instruction_display_light_mode",
"instruction_display_unknown_ext",
"instruction_generic_back",
]
# Build options list - same for all platforms
# layout, font, footer, family, monitor, light, unknown, back (8)
options = [layout_txt, font_txt, footer_font_txt, font_family_txt, monitor_txt, light_txt, unknown_txt, back_txt]
instruction_keys = [
"instruction_display_layout",
"instruction_display_font_size",
"instruction_display_footer_font_size",
"instruction_display_font_family",
"instruction_display_monitor",
"instruction_display_light_mode",
"instruction_display_unknown_ext",
"instruction_generic_back",
]
_draw_submenu_generic(screen, _("menu_display"), options, selected_index)
key = instruction_keys[selected_index] if 0 <= selected_index < len(instruction_keys) else None

View File

@@ -1,3 +1,3 @@
{
"version": "2.4.0.0"
"version": "2.4.0.1"
}