Skip to content

Refactor Main() into dedicated classes and fix startup bugs - #48

Open
goldorakiller wants to merge 1 commit into
RetroBat-Official:mainfrom
goldorakiller:fix/decompose-main-and-cleanup
Open

Refactor Main() into dedicated classes and fix startup bugs#48
goldorakiller wants to merge 1 commit into
RetroBat-Official:mainfrom
goldorakiller:fix/decompose-main-and-cleanup

Conversation

@goldorakiller

Copy link
Copy Markdown
  • Fix: propagate --external-launcher to the intro video, so it no longer forces focus back to EmulationStation when launched from an external frontend.
  • Fix: align FocusDelay/VideoDelay fallback defaults with the values written to the default retrobat.ini (previously inconsistent).
  • Fix: preserve original exception stack trace in IniFile's constructor (throw ex; -> throw;).
  • Cleanup: remove RawInput.cs (dead code, never referenced) and the orphaned SharpDX packages.config entry (no longer referenced by the project).
  • Cleanup: replace empty catch { } blocks with logged warnings across Program.cs, SplashVideo.cs and VideoPlayerForm.cs.
  • Refactor: split the ~900-line Main() into focused, testable classes: StartupFileChecker, RetroBatConfigLoader, AutostartManager, DpiAwarenessManager, EmulationStationSettings and EmulationStationLauncher. Behavior is preserved, including edge cases (early return when EmulationStation fails to start still skips the final success log, same as before).

- Fix: propagate --external-launcher to the intro video, so it no longer
  forces focus back to EmulationStation when launched from an external
  frontend.
- Fix: align FocusDelay/VideoDelay fallback defaults with the values
  written to the default retrobat.ini (previously inconsistent).
- Fix: preserve original exception stack trace in IniFile's constructor
  (`throw ex;` -> `throw;`).
- Cleanup: remove RawInput.cs (dead code, never referenced) and the
  orphaned SharpDX packages.config entry (no longer referenced by the
  project).
- Cleanup: replace empty `catch { }` blocks with logged warnings across
  Program.cs, SplashVideo.cs and VideoPlayerForm.cs.
- Refactor: split the ~900-line Main() into focused, testable classes:
  StartupFileChecker, RetroBatConfigLoader, AutostartManager,
  DpiAwarenessManager, EmulationStationSettings and
  EmulationStationLauncher. Behavior is preserved, including edge cases
  (early return when EmulationStation fails to start still skips the
  final success log, same as before).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant