PCSX2 Documentation/The PCSX2 Program Flow: Difference between revisions

no edit summary
No edit summary
Line 19: Line 19:
You can see here that the Pcsx2App class is an extension of the wxAppWithHelpers class. WxWidgets applications are defined as classes, which are instantiated into an object when we start the program. Pcsx2App contains methods that wxWidgets is going to call upon at various times. So what gets called when we fire up Pcsx2App? That would be the OnInit() method which is defined in  There's all kinds of crazy stuff happening here, but what we really care about is this line:
You can see here that the Pcsx2App class is an extension of the wxAppWithHelpers class. WxWidgets applications are defined as classes, which are instantiated into an object when we start the program. Pcsx2App contains methods that wxWidgets is going to call upon at various times. So what gets called when we fire up Pcsx2App? That would be the OnInit() method which is defined in  There's all kinds of crazy stuff happening here, but what we really care about is this line:


<code>[https://github.com/PCSX2/pcsx2/blob/master/pcsx2/gui/AppInit.cpp AppInit.cpp]</code>
<code>in [https://github.com/PCSX2/pcsx2/blob/master/pcsx2/gui/AppInit.cpp AppInit.cpp]</code>
<source lang="cpp">
<source lang="cpp">
if( m_UseGUI ) OpenMainFrame();
if( m_UseGUI ) OpenMainFrame();
Line 28: Line 28:
In addition to Application classes, there are also Frame classes. So when we call the OpenMainFrame function, what happens? Take a look at this code:
In addition to Application classes, there are also Frame classes. So when we call the OpenMainFrame function, what happens? Take a look at this code:


<code>[https://github.com/PCSX2/pcsx2/blob/master/pcsx2/gui/AppInit.cpp pcsx2/gui/AppInit.cpp]</code>
<code>in [https://github.com/PCSX2/pcsx2/blob/master/pcsx2/gui/AppInit.cpp pcsx2/gui/AppInit.cpp]</code>
<source lang="cpp">
<source lang="cpp">
void Pcsx2App::OpenMainFrame()
void Pcsx2App::OpenMainFrame()
Line 44: Line 44:
Here we're creating an instance of the MainEmuFrame class. That class contains members for all the cool GUI elements, buttons, menus, stuff like that. So let's take a step further. Suppose we want to boot up a game. When we select Boot DVD in the pcsx2 menus, we are calling upon this function here:
Here we're creating an instance of the MainEmuFrame class. That class contains members for all the cool GUI elements, buttons, menus, stuff like that. So let's take a step further. Suppose we want to boot up a game. When we select Boot DVD in the pcsx2 menus, we are calling upon this function here:


<code>[https://github.com/PCSX2/pcsx2/blob/f3bb434b27737849546290bbfc8d09c61103081c/pcsx2/gui/MainMenuClicks.cpp MainMenuClicks.cpp]</code>
<code>in [https://github.com/PCSX2/pcsx2/blob/f3bb434b27737849546290bbfc8d09c61103081c/pcsx2/gui/MainMenuClicks.cpp MainMenuClicks.cpp]</code>
<source lang="cpp">
<source lang="cpp">


void MainEmuFrame::_DoBootCdvd()
void MainEmuFrame::_DoBootCdvd()
</source>
</source>
ninja
782

edits