Exemple #1
0
void    Input_ROM_Change (void)
{
    int     input = INPUT_JOYPAD;
    bool    glasses = FALSE;
    if (DB_CurrentEntry)
    {
        if (DB_CurrentEntry->emu_inputs != -1)
            input = DB_CurrentEntry->emu_inputs;
        if (DB_CurrentEntry->flags & DB_FLAG_EMU_3D)
            glasses = TRUE;
    }
    if (Inputs.Peripheral [PLAYER_1] != input)
    {
        Inputs.Peripheral [PLAYER_1] = input;
        Inputs_Switch_Current ();
    }
    if (Glasses.Enabled != glasses)
    {
        Glasses_Switch_Enable ();
    }
}
Exemple #2
0
int     Glasses_Must_Skip_Frame(void)
{
    static int security_cnt = 0;
    // Msg(MSGT_DEBUG, "%02X-%02X-%02X-%02X", RAM[0x1FF8], RAM[0x1FF9], RAM[0x1FFA], RAM[0x1FFB]);

    const int side = (sms.Glasses_Register & 1);
    const bool ret = (Glasses.Mode == GLASSES_MODE_SHOW_ONLY_LEFT && !side) || (Glasses.Mode == GLASSES_MODE_SHOW_ONLY_RIGHT && side);
    if (ret == FALSE)
    {
        security_cnt = 0;
    }
    else
    {
        if (++security_cnt >= 180) // Arbitrary value (180 updates, should be 3 seconds)
        {
            security_cnt = 0;
            Msg(MSGT_USER, "%s", Msg_Get(MSG_Glasses_Unsupported));
            // Msg(MSGT_USER_BOX, "%s", Msg_Get(MSG_Glasses_Unsupported2));
            Glasses_Switch_Enable();
        }
    }
    return (ret);
}