- Timestamp:
- 07/23/2017 10:17:42 AM (7 years ago)
- Branches:
- master
- Children:
- a23f3d9
- Parents:
- a1fd5d5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
emu/sdl.c
ra1fd5d5 rbb4fd0c 24 24 #define ver3(...) _ver(sdl_verbose, 2, __VA_ARGS__) 25 25 26 SDL_Window *sdl_win; 27 SDL_Renderer *sdl_ren; 28 26 29 void sdl_init(void) 27 30 { … … 36 39 fail("TTF_Init() failed: %s", TTF_GetError()); 37 40 } 41 42 SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "1"); 43 44 sdl_win = SDL_CreateWindow("Emu", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 45 WIN_W, WIN_H, 0); 46 47 if (sdl_win == NULL) { 48 fail("SDL_CreateWindow() failed: %s", SDL_GetError()); 49 } 50 51 sdl_ren = SDL_CreateRenderer(sdl_win, -1, 0); 52 53 if (sdl_ren == NULL) { 54 fail("SDL_CreateRenderer() failed: %s", SDL_GetError()); 55 } 56 57 SDL_StartTextInput(); 38 58 } 39 59 40 60 void sdl_quit(void) 41 61 { 62 SDL_DestroyRenderer(sdl_ren); 63 SDL_DestroyWindow(sdl_win); 42 64 TTF_Quit(); 43 65 SDL_Quit();
Note:
See TracChangeset
for help on using the changeset viewer.