test/relative_mode.markdown
changeset 9337 7e5940a2cda6
parent 7105 0de0f099cfd6
equal deleted inserted replaced
9336:1a1ec75b608c 9337:7e5940a2cda6
    35         return 0;
    35         return 0;
    36     }
    36     }
    37 
    37 
    38     int main(int argc, char *argv[])
    38     int main(int argc, char *argv[])
    39     {
    39     {
       
    40         SDL_Window *win;
       
    41 
    40         SDL_Init(SDL_INIT_VIDEO);
    42         SDL_Init(SDL_INIT_VIDEO);
    41 
    43 
    42         SDL_Window *win = SDL_CreateWindow("Test", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 800, 600, 0);
    44         win = SDL_CreateWindow("Test", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 800, 600, 0);
    43         SDL_SetRelativeMouseMode(SDL_TRUE);
    45         SDL_SetRelativeMouseMode(SDL_TRUE);
    44 
    46 
    45         while (1)
    47         while (1)
    46         {
    48         {
    47             if (PollEvents())
    49             if (PollEvents())