test/testrelative.c
changeset 6316 a89c79a3f0cd
parent 6311 4e5e46f43438
child 6318 49b2cb56db6e
equal deleted inserted replaced
6315:ad9087c284e9 6316:a89c79a3f0cd
    52         SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);
    52         SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);
    53         SDL_RenderClear(renderer);
    53         SDL_RenderClear(renderer);
    54     }
    54     }
    55 
    55 
    56     srand((unsigned int)time(NULL));
    56     srand((unsigned int)time(NULL));
    57     SDL_SetRelativeMouseMode(SDL_TRUE);
    57     if(SDL_SetRelativeMouseMode(SDL_TRUE) < 0) {
       
    58         return 3;
       
    59     };
    58 
    60 
    59     rect.x = DEFAULT_WINDOW_WIDTH / 2;
    61     rect.x = DEFAULT_WINDOW_WIDTH / 2;
    60     rect.y = DEFAULT_WINDOW_HEIGHT / 2;
    62     rect.y = DEFAULT_WINDOW_HEIGHT / 2;
    61     rect.w = 10;
    63     rect.w = 10;
    62     rect.h = 10;
    64     rect.h = 10;