(RARCH_CONSOLE) message queue needs to be inited long before

Retro arch main init function - also added some onscreen
messages to some of the settings for the 360 port
This commit is contained in:
TwinAphex51224 2012-05-22 04:14:28 +02:00
parent 611dd9f34e
commit 7064abded5
5 changed files with 17 additions and 1 deletions

View File

@ -404,6 +404,8 @@ int main(int argc, char *argv[])
rarch_main_clear_state();
config_set_defaults();
rarch_assert(g_extern.msg_queue = msg_queue_new(8));
char full_path[1024];
snprintf(full_path, sizeof(full_path), "game:\\CORE.xex");

View File

@ -22,6 +22,7 @@
#include "../console/console_ext.h"
#include "xdk360_video.h"
#include "menu.h"
#include "../message.h"
#include "shared.h"
#include "../general.h"
@ -240,6 +241,8 @@ HRESULT CRetroArchQuickMenu::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled
break;
case MENU_ITEM_RESIZE_MODE:
g_console.input_loop = INPUT_LOOP_RESIZE_MODE;
msg_queue_clear(g_extern.msg_queue);
msg_queue_push(g_extern.msg_queue, "Resize the screen by moving around the two analog sticks.\nPress Y to reset to default values, and B to go back.\nNOTE: To select the resized screen mode, set Aspect Ratio to: 'Custom'.", 1, 180);
break;
case MENU_ITEM_FRAME_ADVANCE:
if (g_console.emulator_initialized)
@ -434,12 +437,16 @@ HRESULT CRetroArchSettings::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled
switch(current_index)
{
case SETTING_EMU_REWIND_ENABLED:
g_settings.rewind_enable = !g_settings.rewind_enable;
g_settings.rewind_enable = !g_settings.rewind_enable;
m_settingslist.SetText(SETTING_EMU_REWIND_ENABLED, g_settings.rewind_enable ? L"Rewind: ON" : L"Rewind: OFF");
msg_queue_clear(g_extern.msg_queue);
msg_queue_push(g_extern.msg_queue, "NOTE: You need to restart Retro Arch for this change to take effect.", 1, 180);
break;
case SETTING_GAMMA_CORRECTION_ENABLED:
g_console.gamma_correction_enable = !g_console.gamma_correction_enable;
m_settingslist.SetText(SETTING_GAMMA_CORRECTION_ENABLED, g_console.gamma_correction_enable ? L"Gamma correction: ON" : L"Gamma correction: OFF");
msg_queue_clear(g_extern.msg_queue);
msg_queue_push(g_extern.msg_queue, "NOTE: You need to restart Retro Arch for this change to take effect.", 1, 180);
break;
case SETTING_SHADER:
set_shader = 1;

View File

@ -468,6 +468,8 @@ int main(int argc, char *argv[])
config_set_defaults();
rarch_assert(g_extern.msg_queue = msg_queue_new(8));
char full_path[1024], tmp_path[1024];
snprintf(full_path, sizeof(full_path), "%s/%s/CORE.SELF", usrDirPath, EMULATOR_CORE_DIR);
snprintf(tmp_path, sizeof(tmp_path), "%s/%s/", usrDirPath, EMULATOR_CORE_DIR);

View File

@ -2328,7 +2328,10 @@ int rarch_main_init(int argc, char *argv[])
goto error;
init_system_av_info();
#ifndef RARCH_CONSOLE
//we have to init the message queue way in advance for console ports
init_msg_queue();
#endif
if (!g_extern.sram_load_disable)
load_save_files();

View File

@ -135,6 +135,8 @@ int main(void)
log_fp = fopen("sd:/ssnes-log.txt", "w");
#endif
rarch_assert(g_extern.msg_queue = msg_queue_new(8));
wii_video_init();
wii_input_init();