void SystemStub_SDL::destroy() {
	cleanupGfxMode();
	if (SDL_JoystickOpened(0)) {
		SDL_JoystickClose(_joystick);
	}
	SDL_Quit();
}
Beispiel #2
0
void MoSyncStub::init(const char *title, uint16 w, uint16 h) {
	memset(&_pi, 0, sizeof(_pi));
	_screenW = w;
	_screenH = h;
	_numBlitRects = 0;

	_offscreen = 0;
	cleanupGfxMode();
	int size_offscreen = (w + 2) * (h + 2);
	_offscreen = (uint8 *)malloc(size_offscreen);
	if (!_offscreen) {
		error("SystemStub_SDL::init() Unable to allocate offscreen buffer");
	}

	memset(_offscreen, 0, size_offscreen);

	orientation = ORIENTATION_0;
	FrameBuffer_init(w, h, orientation, FLAG_RGB666);
	audioCallback = 0;
}
Beispiel #3
0
void SDLStub::destroy() {
	cleanupGfxMode();
	SDL_Quit();
}