2015-05-23 22:55:12 -06:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2015-05-17 17:08:10 -06:00
|
|
|
// Licensed under GPLv2+
|
2013-04-17 21:43:35 -06:00
|
|
|
// Refer to the license.txt file included.
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-02-10 11:54:46 -07:00
|
|
|
#pragma once
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2015-08-27 06:12:34 -06:00
|
|
|
#include <memory>
|
2014-02-22 15:36:30 -07:00
|
|
|
#include <wx/app.h>
|
2009-03-20 12:25:36 -06:00
|
|
|
|
|
|
|
class CFrame;
|
2016-01-17 04:15:03 -07:00
|
|
|
class wxCmdLineParser;
|
2014-02-22 15:36:30 -07:00
|
|
|
class wxLocale;
|
|
|
|
|
2014-07-08 07:58:25 -06:00
|
|
|
extern CFrame* main_frame;
|
|
|
|
|
2014-02-22 15:36:30 -07:00
|
|
|
// Define a new application
|
2009-03-20 12:25:36 -06:00
|
|
|
class DolphinApp : public wxApp
|
2008-12-07 21:46:09 -07:00
|
|
|
{
|
2009-03-20 12:25:36 -06:00
|
|
|
public:
|
2016-10-27 19:50:09 -06:00
|
|
|
bool IsActiveThreadsafe() const { return m_is_active; }
|
2016-06-24 02:43:46 -06:00
|
|
|
CFrame* GetCFrame();
|
2011-01-19 20:26:51 -07:00
|
|
|
|
|
|
|
private:
|
2016-06-24 02:43:46 -06:00
|
|
|
bool OnInit() override;
|
|
|
|
void OnInitCmdLine(wxCmdLineParser& parser) override;
|
2017-02-26 18:35:31 -07:00
|
|
|
bool OnCmdLineParsed(wxCmdLineParser& parser) override;
|
2016-01-17 04:15:03 -07:00
|
|
|
int OnExit() override;
|
2016-06-24 02:43:46 -06:00
|
|
|
void OnFatalException() override;
|
|
|
|
bool Initialize(int& c, wxChar** v) override;
|
2015-08-27 04:59:23 -06:00
|
|
|
|
2015-06-21 13:28:49 -06:00
|
|
|
#ifdef __APPLE__
|
2016-06-24 02:43:46 -06:00
|
|
|
void MacOpenFile(const wxString& fileName) override;
|
2015-06-21 13:28:49 -06:00
|
|
|
#endif
|
2010-07-07 16:00:41 -06:00
|
|
|
|
2016-06-24 02:43:46 -06:00
|
|
|
void OnEndSession(wxCloseEvent& event);
|
|
|
|
void InitLanguageSupport();
|
|
|
|
void AfterInit();
|
2016-10-27 19:50:09 -06:00
|
|
|
void OnActivate(wxActivateEvent& ev);
|
2016-06-24 02:43:46 -06:00
|
|
|
void OnIdle(wxIdleEvent&);
|
|
|
|
|
2016-01-17 04:15:03 -07:00
|
|
|
void ParseCommandLine();
|
|
|
|
|
2016-06-24 02:43:46 -06:00
|
|
|
bool m_batch_mode = false;
|
|
|
|
bool m_confirm_stop = false;
|
2016-10-27 19:50:09 -06:00
|
|
|
bool m_is_active = true;
|
2016-06-24 02:43:46 -06:00
|
|
|
bool m_load_file = false;
|
|
|
|
bool m_play_movie = false;
|
|
|
|
bool m_use_debugger = false;
|
|
|
|
bool m_use_logger = false;
|
|
|
|
bool m_select_video_backend = false;
|
|
|
|
bool m_select_audio_emulation = false;
|
2016-01-17 04:15:03 -07:00
|
|
|
bool m_confirm_setting;
|
2016-06-24 02:43:46 -06:00
|
|
|
wxString m_video_backend_name;
|
|
|
|
wxString m_audio_emulation_name;
|
|
|
|
wxString m_user_path;
|
|
|
|
wxString m_file_to_load;
|
|
|
|
wxString m_movie_file;
|
|
|
|
std::unique_ptr<wxLocale> m_locale;
|
2008-12-07 21:46:09 -07:00
|
|
|
};
|
|
|
|
|
2009-03-20 12:25:36 -06:00
|
|
|
DECLARE_APP(DolphinApp);
|