sudo459 Posted May 2, 2017 I decided to post this here, since chocolate-doom and many other source ports use SDL, and I don't see the same problem after I quit them. So I'm trying to write a simple game to teach myself "low" level programming. I'm using arch Linux, and I'm not using a window manager. My simple SDL program creates a fullscreen window, blits a blue rectangle to the window surface, updates, cleans everything up and quits. Unforntunately, after the program exits, my xterm no longer reads keyboard input. I can still copy and paste with the mouse, but that's about it. I can't even write anything in vim after (starting it with a copy and paste, of course). Did chocolate-doom face the same problem in development, and how does it get around this issue? Code: #include <SDL2/SDL.h> int main(int argc, char **argv) { SDL_Init(SDL_INIT_EVERYTHING); SDL_Window *win; SDL_Surface *win_surf; SDL_Rect screen_dim; screen_dim.x = 0; screen_dim.y = 0; screen_dim.w = 1280; screen_dim.h = 720; win = SDL_CreateWindow("", 0, 0, 1280, 720, SDL_WINDOW_SHOWN); win_surf = SDL_GetWindowSurface(win); SDL_FillRect(win_surf, &screen_dim, (unsigned)0xFFF0F0FF0); SDL_UpdateWindowSurface(win); SDL_Delay(2000); SDL_DestroyWindow(win); SDL_Quit(); return 0; } 0 Share this post Link to post
Remilia Scarlet Posted May 6, 2017 If you type "reset" and hit enter (even if nothing shows up when you type), does it start working after that? 0 Share this post Link to post