PCSX2 Documentation/The PCSX2 Program Flow: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
''The following article is a very general overview of the flow of the PCSX2 application. It's a bit sloppy right now, I will clean it up more as I go along.''
''The following article is a very general overview of the flow of the PCSX2 application. It's a bit sloppy right now, I will clean it up more as I go along.''


==AppMain.cpp - this is where the fun begins!==
==AppMain.cpp - It all starts here==
There is a lot that happens under the hood with wxWidgets. We don't need to worry about that. All we need to worry about is this this line of code:
There is a lot that happens under the hood with wxWidgets. We don't need to worry about that. All we need to worry about is this this line of code:


<code>in [https://github.com/PCSX2/pcsx2/blob/master/pcsx2/gui/AppMain.cpp AppMain.cpp]</code>
'''in [https://github.com/PCSX2/pcsx2/blob/master/pcsx2/gui/AppMain.cpp AppMain.cpp]'''
<source lang="cpp">IMPLEMENT_APP(Pcsx2App)</source>
<source lang="cpp">IMPLEMENT_APP(Pcsx2App)</source>


Line 13: Line 13:




<code>in [https://github.com/PCSX2/pcsx2/blob/master/pcsx2/gui/App.h App.h]</code>
'''in [https://github.com/PCSX2/pcsx2/blob/master/pcsx2/gui/App.h App.h]'''
<source lang=cpp>
<source lang=cpp>
class Pcsx2App : public wxAppWithHelpers{}
class Pcsx2App : public wxAppWithHelpers{}
Line 20: Line 20:




<code>in [https://github.com/PCSX2/pcsx2/blob/master/pcsx2/gui/AppInit.cpp AppInit.cpp]</code>
'''in [https://github.com/PCSX2/pcsx2/blob/master/pcsx2/gui/AppInit.cpp AppInit.cpp]'''
<source lang="cpp">
<source lang="cpp">
bool Pcsx2App::OnInit()
bool Pcsx2App::OnInit()
Line 61: Line 61:
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>in [https://github.com/PCSX2/pcsx2/blob/master/pcsx2/gui/AppInit.cpp pcsx2/gui/AppInit.cpp]</code>
'''in [https://github.com/PCSX2/pcsx2/blob/master/pcsx2/gui/AppInit.cpp pcsx2/gui/AppInit.cpp]'''
<source lang="cpp">
<source lang="cpp">
void Pcsx2App::OpenMainFrame()
void Pcsx2App::OpenMainFrame()
Line 77: Line 77:
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>in [https://github.com/PCSX2/pcsx2/blob/f3bb434b27737849546290bbfc8d09c61103081c/pcsx2/gui/MainMenuClicks.cpp MainMenuClicks.cpp]</code>
'''in [https://github.com/PCSX2/pcsx2/blob/f3bb434b27737849546290bbfc8d09c61103081c/pcsx2/gui/MainMenuClicks.cpp MainMenuClicks.cpp]'''
<source lang="cpp">
<source lang="cpp">
void MainEmuFrame::_DoBootCdvd()
void MainEmuFrame::_DoBootCdvd()
Line 90: Line 90:
====SysMtgsThread====
====SysMtgsThread====
Handles the Graphics Synthesizer (GSdx or other plugins).
Handles the Graphics Synthesizer (GSdx or other plugins).


{{PCSX2 Documentation Navbox}}
{{PCSX2 Documentation Navbox}}
ninja
782

edits