diff --git a/src/common/FrameBufferSDL2.cxx b/src/common/FrameBufferSDL2.cxx index d0b488be1..af4ef0e02 100644 --- a/src/common/FrameBufferSDL2.cxx +++ b/src/common/FrameBufferSDL2.cxx @@ -174,7 +174,9 @@ void FrameBufferSDL2::updateWindowedPos() if (!myCenter && myWindow && !(SDL_GetWindowFlags(myWindow) & SDL_WINDOW_FULLSCREEN_DESKTOP)) { // save current windowed position - SDL_GetWindowPosition(myWindow, &myWindowedPos.x, &myWindowedPos.y); + Int32 x = 0, y = 0; + SDL_GetWindowPosition(myWindow, &x, &y); + myWindowedPos = Common::Point(x, y); myOSystem.settings().setValue("windowedpos", myWindowedPos); } } diff --git a/src/common/Rect.hxx b/src/common/Rect.hxx index 97251b5cd..832d95e88 100644 --- a/src/common/Rect.hxx +++ b/src/common/Rect.hxx @@ -32,12 +32,12 @@ namespace Common { */ struct Point { - Int32 x; //!< The horizontal part of the point - Int32 y; //!< The vertical part of the point + uInt32 x; //!< The horizontal part of the point + uInt32 y; //!< The vertical part of the point Point() : x(0), y(0) { } Point(const Point& p) : x(p.x), y(p.y) { } - explicit Point(Int32 x1, Int32 y1) : x(x1), y(y1) { } + explicit Point(uInt32 x1, uInt32 y1) : x(x1), y(y1) { } explicit Point(const string& p) : x(0), y(0) { char c = '\0'; istringstream buf(p);