Exemplo n.º 1
0
m64p_error main_reset(int do_hard_reset)
{
   if (do_hard_reset)
      reset_hard_job |= 1;
   else
      reset_soft();
   return M64ERR_SUCCESS;
}
Exemplo n.º 2
0
void event_sdl_keydown(int keysym, int keymod)
{
    int slot;

    /* check for the only 2 hard-coded key commands: Alt-enter for fullscreen and 0-9 for save state slot */
    if (keysym == SDL_SCANCODE_RETURN && keymod & (KMOD_LALT | KMOD_RALT))
        gfx.changeWindow();
    else if ((slot = get_saveslot_from_keysym(keysym)) >= 0)
        main_state_set_slot(slot);
    /* check all of the configurable commands */
    else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdStop)))
        main_stop();
    else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdFullscreen)))
        gfx.changeWindow();
    else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdSave)))
        main_state_save(0, NULL); /* save in mupen64plus format using current slot */
    else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdLoad)))
        main_state_load(NULL); /* load using current slot */
    else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdIncrement)))
        main_state_inc_slot();
    else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdReset)))
        reset_soft();
    else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdSpeeddown)))
        main_speeddown(5);
    else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdSpeedup)))
        main_speedup(5);
    else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdScreenshot)))
        main_take_next_screenshot();    /* screenshot will be taken at the end of frame rendering */
    else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdPause)))
        main_toggle_pause();
    else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdMute)))
        main_volume_mute();
    else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdIncrease)))
        main_volume_up();
    else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdDecrease)))
        main_volume_down();
    else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdForward)))
        main_set_fastforward(1);
    else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdAdvance)))
        main_advance_one();
    else if (keysym == sdl_keysym2native(ConfigGetParamInt(l_CoreEventsConfig, kbdGameshark)))
        event_set_gameshark(1);
    else
    {
        /* pass all other keypresses to the input plugin */
        input.keyDown(keymod, keysym);
    }

}
Exemplo n.º 3
0
void ncr5380n_device::device_reset()
{
	clock_conv = 2;
	sync_period = 5;
	sync_offset = 0;
	seq = 0;
	status = 0;
	m_tcommand = 0;
	m_icommand = 0;
	istatus = 0;
	m_busstatus = 0;
	irq = false;
	m_irq_handler(irq);
	reset_soft();
}
Exemplo n.º 4
0
void ncr5390_device::device_reset()
{
	fifo_pos = 0;
	memset(fifo, 0, sizeof(fifo));

	clock_conv = 2;
	sync_period = 5;
	sync_offset = 0;
	seq = 0;
	config &= 7;
	status &= 0x90;
	istatus = 0;
	irq = false;
	m_irq_handler(irq);
	reset_soft();
}