void AtariGemdos_InitOSKeymap(_THIS) { int i, vectors_mask; unsigned long dummy; SDL_memset(gemdos_currentkeyboard, 0, sizeof(gemdos_currentkeyboard)); SDL_memset(gemdos_previouskeyboard, 0, sizeof(gemdos_previouskeyboard)); /* Initialize keymap */ for ( i=0; i<sizeof(keymap); i++ ) keymap[i] = SDLK_UNKNOWN; /* Functions keys */ for ( i = 0; i<10; i++ ) keymap[SCANCODE_F1 + i] = SDLK_F1+i; /* Cursor keypad */ keymap[SCANCODE_HELP] = SDLK_HELP; keymap[SCANCODE_UNDO] = SDLK_UNDO; keymap[SCANCODE_INSERT] = SDLK_INSERT; keymap[SCANCODE_CLRHOME] = SDLK_HOME; keymap[SCANCODE_UP] = SDLK_UP; keymap[SCANCODE_DOWN] = SDLK_DOWN; keymap[SCANCODE_RIGHT] = SDLK_RIGHT; keymap[SCANCODE_LEFT] = SDLK_LEFT; /* Special keys */ keymap[SCANCODE_ESCAPE] = SDLK_ESCAPE; keymap[SCANCODE_BACKSPACE] = SDLK_BACKSPACE; keymap[SCANCODE_TAB] = SDLK_TAB; keymap[SCANCODE_ENTER] = SDLK_RETURN; keymap[SCANCODE_DELETE] = SDLK_DELETE; keymap[SCANCODE_LEFTCONTROL] = SDLK_LCTRL; keymap[SCANCODE_LEFTSHIFT] = SDLK_LSHIFT; keymap[SCANCODE_RIGHTSHIFT] = SDLK_RSHIFT; keymap[SCANCODE_LEFTALT] = SDLK_LALT; keymap[SCANCODE_CAPSLOCK] = SDLK_CAPSLOCK; use_dev_mouse = (SDL_AtariDevMouse_Open()!=0) ? SDL_TRUE : SDL_FALSE; vectors_mask = ATARI_XBIOS_JOYSTICKEVENTS; /* XBIOS joystick events */ if (!use_dev_mouse) { vectors_mask |= ATARI_XBIOS_MOUSEEVENTS; /* XBIOS mouse events */ } if (Getcookie(C_MiNT, &dummy)==C_FOUND) { vectors_mask = 0; } SDL_AtariXbios_InstallVectors(vectors_mask); }
void AtariBios_InitOSKeymap(_THIS) { int vectors_mask; SDL_memset(bios_currentkeyboard, 0, sizeof(bios_currentkeyboard)); SDL_memset(bios_previouskeyboard, 0, sizeof(bios_previouskeyboard)); use_dev_mouse = (SDL_AtariDevMouse_Open()!=0) ? SDL_TRUE : SDL_FALSE; vectors_mask = ATARI_XBIOS_JOYSTICKEVENTS; if (!use_dev_mouse) { vectors_mask |= ATARI_XBIOS_MOUSEEVENTS; } SDL_AtariXbios_InstallVectors(vectors_mask); }
void AtariGemdos_InitOSKeymap(_THIS) { int vectors_mask; /* unsigned long dummy;*/ SDL_memset(gemdos_currentkeyboard, 0, sizeof(gemdos_currentkeyboard)); SDL_memset(gemdos_previouskeyboard, 0, sizeof(gemdos_previouskeyboard)); use_dev_mouse = (SDL_AtariDevMouse_Open()!=0) ? SDL_TRUE : SDL_FALSE; vectors_mask = ATARI_XBIOS_JOYSTICKEVENTS; /* XBIOS joystick events */ if (!use_dev_mouse) { vectors_mask |= ATARI_XBIOS_MOUSEEVENTS; /* XBIOS mouse events */ } /* if (Getcookie(C_MiNT, &dummy)==C_FOUND) { vectors_mask = 0; }*/ SDL_AtariXbios_InstallVectors(vectors_mask); }
static SDL_VideoDevice *GEM_CreateDevice(int devindex) { SDL_VideoDevice *device; int vectors_mask; unsigned long dummy; /* Initialize all variables that we clean on shutdown */ device = (SDL_VideoDevice *)SDL_malloc(sizeof(SDL_VideoDevice)); if ( device ) { SDL_memset(device, 0, (sizeof *device)); device->hidden = (struct SDL_PrivateVideoData *) SDL_malloc((sizeof *device->hidden)); device->gl_data = (struct SDL_PrivateGLData *) SDL_malloc((sizeof *device->gl_data)); } if ( (device == NULL) || (device->hidden == NULL) ) { SDL_OutOfMemory(); if ( device ) { SDL_free(device); } return(0); } SDL_memset(device->hidden, 0, (sizeof *device->hidden)); SDL_memset(device->gl_data, 0, sizeof(*device->gl_data)); /* Set the function pointers */ device->VideoInit = GEM_VideoInit; device->ListModes = GEM_ListModes; device->SetVideoMode = GEM_SetVideoMode; device->SetColors = GEM_SetColors; device->UpdateRects = NULL /*GEM_UpdateRects*/; device->VideoQuit = GEM_VideoQuit; device->AllocHWSurface = GEM_AllocHWSurface; device->LockHWSurface = GEM_LockHWSurface; device->UnlockHWSurface = GEM_UnlockHWSurface; device->FlipHWSurface = GEM_FlipHWSurface; device->FreeHWSurface = GEM_FreeHWSurface; device->ToggleFullScreen = NULL /*GEM_ToggleFullScreen*/; /* Window manager */ device->SetCaption = GEM_SetCaption; device->SetIcon = GEM_SetIcon; device->IconifyWindow = GEM_IconifyWindow; device->GrabInput = GEM_GrabInput; /* Events */ device->InitOSKeymap = GEM_InitOSKeymap; device->PumpEvents = GEM_PumpEvents; /* Mouse */ device->FreeWMCursor = GEM_FreeWMCursor; device->CreateWMCursor = GEM_CreateWMCursor; device->ShowWMCursor = GEM_ShowWMCursor; device->WarpWMCursor = NULL /*GEM_WarpWMCursor*/; device->CheckMouseMode = GEM_CheckMouseMode; #if SDL_VIDEO_OPENGL /* OpenGL functions */ device->GL_LoadLibrary = SDL_AtariGL_LoadLibrary; device->GL_GetProcAddress = SDL_AtariGL_GetProcAddress; device->GL_GetAttribute = SDL_AtariGL_GetAttribute; device->GL_MakeCurrent = SDL_AtariGL_MakeCurrent; device->GL_SwapBuffers = GEM_GL_SwapBuffers; #endif device->hidden->use_dev_mouse = (SDL_AtariDevMouse_Open()!=0) ? SDL_TRUE : SDL_FALSE; vectors_mask = ATARI_XBIOS_JOYSTICKEVENTS; /* XBIOS joystick events */ if (!(device->hidden->use_dev_mouse)) { vectors_mask |= ATARI_XBIOS_MOUSEEVENTS; /* XBIOS mouse events */ } SDL_AtariXbios_InstallVectors(vectors_mask); device->free = GEM_DeleteDevice; return device; }