Do proper error handling inside Screen::ResizeScreen()

Instead of passing the error codes out of the function, just handle the
errors directly as they happen, and fail gracefully if something goes
wrong instead of continuing.
This commit is contained in:
Misa
2020-03-13 15:22:37 -07:00
committed by Ethan Lee
parent 9175c08763
commit cad0b4fcc4
3 changed files with 35 additions and 20 deletions

View File

@@ -8,7 +8,7 @@ class Screen
public:
Screen();
int ResizeScreen(int x, int y);
void ResizeScreen(int x, int y);
void GetWindowSize(int* x, int* y);
void UpdateScreen(SDL_Surface* buffer, SDL_Rect* rect);
@@ -17,7 +17,7 @@ public:
const SDL_PixelFormat* GetFormat();
int toggleFullScreen();
void toggleFullScreen();
void toggleStretchMode();
void toggleLinearFilter();