PCSX2 Documentation/The PCSX2 Program Flow: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 15: Line 15:
if( m_UseGUI ) OpenMainFrame();
if( m_UseGUI ) OpenMainFrame();
</source>
</source>
In addition to Application classes, there are also Frame classes. The frame classes define the different windows in the GUI, and inside the frame classes are the various GUI parts that we can click on and interact with. This is opening the main pcsx2 window, which is declared in this header file: [https://github.com/PCSX2/pcsx2/blob/master/pcsx2/gui/MainFrame.h MainFrame.h]. Take a look and you can see declarations for all the PCSX2 buttons and menus and all of that cool stuff! They are all defined in [https://github.com/PCSX2/pcsx2/blob/master/pcsx2/gui/MainFrame.cpp MainFrame.cpp].


==Into the Core==
==WxWidgets Frames==
Alright, so what happens when we load an iso?
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 [https://github.com/PCSX2/pcsx2/blob/master/pcsx2/gui/AppInit.cpp AppInit.cpp].
<source lang="cpp">
void Pcsx2App::OpenMainFrame()
{
if( AppRpc_TryInvokeAsync( &Pcsx2App::OpenMainFrame ) ) return;
 
if( GetMainFramePtr() != NULL ) return;
 
MainEmuFrame* mainFrame = new MainEmuFrame( NULL, pxGetAppName() );
 
...
}
</source>
 
Here we're creating an instance of the [https://github.com/PCSX2/pcsx2/blob/e726f82344fa4e8c2e9d7be99364dbac35429499/pcsx2/gui/MainFrame.h MainEmuFrame class]. That class contains
ninja
782

edits