2018-08-04 22:22:15 -07:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <SDL.h>
|
|
|
|
|
2022-04-05 00:50:04 -05:00
|
|
|
// SDL_FRect wasn't added until 2.0.10
|
|
|
|
#if !SDL_VERSION_ATLEAST(2, 0, 10)
|
|
|
|
typedef struct SDL_FRect
|
|
|
|
{
|
|
|
|
float x;
|
|
|
|
float y;
|
|
|
|
float w;
|
|
|
|
float h;
|
|
|
|
} SDL_FRect;
|
|
|
|
#endif
|
|
|
|
|
2018-08-04 22:22:15 -07:00
|
|
|
class StreamUtils
|
|
|
|
{
|
|
|
|
public:
|
2020-09-05 14:06:56 -07:00
|
|
|
static
|
|
|
|
Uint32 getPlatformWindowFlags();
|
|
|
|
|
2018-08-04 22:22:15 -07:00
|
|
|
static
|
|
|
|
void scaleSourceToDestinationSurface(SDL_Rect* src, SDL_Rect* dst);
|
2018-09-04 00:21:37 -04:00
|
|
|
|
2022-04-05 00:50:04 -05:00
|
|
|
static
|
|
|
|
void screenSpaceToNormalizedDeviceCoords(SDL_FRect* rect, int viewportWidth, int viewportHeight);
|
|
|
|
|
|
|
|
static
|
|
|
|
void screenSpaceToNormalizedDeviceCoords(SDL_Rect* src, SDL_FRect* dst, int viewportWidth, int viewportHeight);
|
|
|
|
|
2018-09-04 00:21:37 -04:00
|
|
|
static
|
|
|
|
bool getRealDesktopMode(int displayIndex, SDL_DisplayMode* mode);
|
2018-09-08 15:09:46 -07:00
|
|
|
|
|
|
|
static
|
|
|
|
int getDisplayRefreshRate(SDL_Window* window);
|
2018-08-04 22:22:15 -07:00
|
|
|
};
|