(360) Have 360 port use same setting variables as PS3 port

from g_console struct
This commit is contained in:
TwinAphex51224 2012-02-02 19:01:52 +01:00
parent a328dbd213
commit 15bc0e0813
4 changed files with 13 additions and 13 deletions

View File

@ -46,7 +46,6 @@ typedef struct _STRING {
extern "C" int __stdcall ObCreateSymbolicLink( STRING*, STRING*);
uint32_t mode_switch = MODE_MENU;
bool init_ssnes = false;
int Mounted[20];
uint32_t g_emulator_initialized = 0;
@ -152,16 +151,18 @@ int main(int argc, char *argv[])
config_set_defaults();
g_console->mode_switch = MODE_MENU;
xdk360_video_init();
menu_init();
begin_loop:
if(mode_switch == MODE_EMULATION)
if(g_console->mode_switch == MODE_EMULATION)
{
while(ssnes_main_iterate());
}
else if(mode_switch == MODE_MENU)
else if(g_console->mode_switch == MODE_MENU)
{
menu_loop();

View File

@ -28,7 +28,6 @@
CSSNES app;
HXUIOBJ hMainScene;
uint32_t menu_is_running;
/* Register custom classes */
HRESULT CSSNES::RegisterXuiClasses (void)
@ -88,8 +87,8 @@ HRESULT CSSNESMain::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandled )
if ( hObjPressed == m_filebrowser )
{
menu_is_running = false;
mode_switch = MODE_EMULATION;
g_console->menu_enable = false;
g_console->mode_switch = MODE_EMULATION;
init_ssnes = 1;
}
else if ( hObjPressed == m_settings )
@ -106,8 +105,8 @@ HRESULT CSSNESMain::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandled )
}
else if ( hObjPressed == m_quit )
{
menu_is_running = false;
mode_switch = MODE_EXIT;
g_console->menu_enable = false;
g_console->mode_switch = MODE_EXIT;
init_ssnes = 0;
}
@ -158,7 +157,7 @@ int menu_init (void)
void menu_loop(void)
{
menu_is_running = true;
g_console->menu_enable = true;
HRESULT hr;
xdk360_video_t *vid = (xdk360_video_t*)g_d3d;
@ -175,5 +174,5 @@ void menu_loop(void)
/* Present the frame */
vid->xdk360_render_device->Present(NULL, NULL, NULL, NULL);
}while(menu_is_running);
}while(g_console->menu_enable);
}

View File

@ -25,5 +25,4 @@ enum
MODE_EXIT
};
extern uint32_t mode_switch;
extern bool init_ssnes;

View File

@ -77,6 +77,7 @@ static void xdk360_gfx_free(void * data)
return;
xdk360_video_t *vid = (xdk360_video_t*)data;
if (!vid)
return;
@ -93,8 +94,8 @@ static void xdk360_gfx_free(void * data)
static void *xdk360_gfx_init(const video_info_t *video, const input_driver_t **input, void **input_data)
{
if (g_d3d)
return g_d3d;
if (g_d3d)
return g_d3d;
xdk360_video_t *vid = (xdk360_video_t*)calloc(1, sizeof(xdk360_video_t));
if (!vid)