2018-08-05 05:22:15 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <SDL.h>
|
|
|
|
|
2022-04-05 05:50:04 +00: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-05 05:22:15 +00:00
|
|
|
class StreamUtils
|
|
|
|
{
|
|
|
|
public:
|
2020-09-05 21:06:56 +00:00
|
|
|
static
|
|
|
|
Uint32 getPlatformWindowFlags();
|
|
|
|
|
2018-08-05 05:22:15 +00:00
|
|
|
static
|
|
|
|
void scaleSourceToDestinationSurface(SDL_Rect* src, SDL_Rect* dst);
|
2018-09-04 04:21:37 +00:00
|
|
|
|
2022-04-05 05:50:04 +00: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 04:21:37 +00:00
|
|
|
static
|
2022-08-16 05:25:49 +00:00
|
|
|
bool getNativeDesktopMode(int displayIndex, SDL_DisplayMode* mode);
|
2018-09-08 22:09:46 +00:00
|
|
|
|
|
|
|
static
|
|
|
|
int getDisplayRefreshRate(SDL_Window* window);
|
2018-08-05 05:22:15 +00:00
|
|
|
};
|