コード例 #1
0
ファイル: tvtype.cpp プロジェクト: maxim-zhao/meka
void    TVType_Set (int tv_type, bool verbose)
{
    TV_Type_User = &TV_Type_Table[tv_type];
    g_machine.TV = TV_Type_User;
    g_machine.TV_lines = TV_Type_User->screen_lines;

    // FIXME: CPU_Clock_Current is not taken into account for IPeriod in CPU emulation

    // 262 * 228 = 59736, * 60 = 3584160
    // 313 * 228 = 71364, * 50 = 3568200

    // SN76489_SetClock(opt.TV_Lines_Current * opt.Cur_IPeriod); // 59736 for NTSC
    // SN76489_SetClock(g_machine.TV->CPU_clock);
    Sound_UpdateClockSpeed();

    if (Sound.LogVGM.Logging == VGM_LOGGING_ACCURACY_SAMPLE)
        VGM_Update_Timing (&Sound.LogVGM);

    if (verbose)
    {
        // Print message & and update GUI checks
        Msg(MSGT_USER, Msg_Get(MSG_TVType_Set), TV_Type_User->name);
        Msg(MSGT_USER_LOG, Msg_Get(MSG_TVType_Info_Speed), TV_Type_User->screen_frequency);
        gui_menu_uncheck_all (menus_ID.tvtype);
        gui_menu_check (menus_ID.tvtype, tv_type);
        // Note that GUI checks are NOT updated if verbose mode is not set.
        // The reason is the parameters in MEKA.NAM can force a TV type, but we don't
        // want the user to be notified by that (unless he manually reoverride it).
    }
}
コード例 #2
0
ファイル: blitintf.c プロジェクト: mnstrmnch/meka
void    Blitters_Switch_Common (void)
{
    if (g_env.state == MEKA_STATE_GAME)
        Video_Setup_State();
    Msg(MSGT_USER, Msg_Get(MSG_Blitters_Set), Blitters.current->name);
    gui_menu_uncheck_all (menus_ID.blitters);
    gui_menu_check (menus_ID.blitters, Blitters.current->index);
}
コード例 #3
0
ファイル: message.c プロジェクト: mnstrmnch/meka
static void		Lang_Set (t_menu_event *event)
{
	Messages.Lang_Cur = (t_lang *)event->user_data;
    gui_menu_uncheck_all (menus_ID.languages);
	gui_menu_check (menus_ID.languages, event->menu_item_idx);
    Msg(MSGT_USER, Msg_Get(MSG_Language_Set), Messages.Lang_Cur->Name);
    Msg(MSGT_USER_BOX, "%s", Msg_Get(MSG_Language_Set_Warning));

    // Post-process
    // FIXME: Rebuild menus
    gamebox_rename_all();
    gui_relayout_all();
}