// // ISDL12InputSubsystem::~ISDL12InputSubsystem // ISDL12InputSubsystem::~ISDL12InputSubsystem() { if (getKeyboardInputDevice()) shutdownKeyboard(0); if (getMouseInputDevice()) shutdownMouse(0); if (getJoystickInputDevice()) shutdownJoystick(0); SDL_QuitSubSystem(SDL_INIT_JOYSTICK); }
static void quitGame(void) { unshowDblLoRes(); videomode(VIDEOMODE_40x24); clrscr(); shutdownMouse(); soundShutdown(); uninitMachine(); exit(0); }
// // ISDL12InputSubsystem::initMouse // void ISDL12InputSubsystem::initMouse(int id) { shutdownMouse(0); const std::vector<IInputDeviceInfo> devices = getMouseDevices(); std::string device_name; for (std::vector<IInputDeviceInfo>::const_iterator it = devices.begin(); it != devices.end(); ++it) { if (it->mId == id) device_name = it->mDeviceName; } Printf(PRINT_HIGH, "I_InitInput: intializing %s\n", device_name.c_str()); if (id == SDL_MOUSE_DRIVER) setMouseInputDevice(new ISDL12MouseInputDevice(id)); #ifdef USE_RAW_WIN32_MOUSE else if (id == RAW_WIN32_MOUSE_DRIVER) setMouseInputDevice(new IRawWin32MouseInputDevice(id)); #endif assert(getMouseInputDevice() != NULL); registerInputDevice(getMouseInputDevice()); getMouseInputDevice()->resume(); }