Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fix behavior of SDL_GetWindowPosition for invalid input; add test cas…

…es to video suite
  • Loading branch information
ferzkopp committed Mar 4, 2013
1 parent bbe13d4 commit fb9dbf9d505047fcb3b9f1aff3e5e0146854d610
Showing with 435 additions and 46 deletions.
  1. +6 −8 src/video/SDL_video.c
  2. +429 −38 test/testautomation_video.c
@@ -1524,18 +1524,16 @@ SDL_SetWindowPosition(SDL_Window * window, int x, int y)
void
SDL_GetWindowPosition(SDL_Window * window, int *x, int *y)
{
/* Clear the values */
if (x) {
*x = 0;
}
if (y) {
*y = 0;
}

CHECK_WINDOW_MAGIC(window, );

/* Fullscreen windows are always at their display's origin */
if (window->flags & SDL_WINDOW_FULLSCREEN) {
if (x) {
*x = 0;
}
if (y) {
*y = 0;
}
} else {
if (x) {
*x = window->x;

0 comments on commit fb9dbf9

Please sign in to comment.