Removed an additional macro alias for fullscreen
This commit is contained in:
parent
feb78d8f9c
commit
a929397cc0
4 changed files with 10 additions and 12 deletions
|
@ -417,8 +417,8 @@ bool game_launcher::init_video()
|
|||
bpp = 32;
|
||||
}
|
||||
|
||||
if(!found_matching && (video_flags & FULL_SCREEN)) {
|
||||
video_flags ^= FULL_SCREEN;
|
||||
if(!found_matching && (video_flags & SDL_FULLSCREEN)) {
|
||||
video_flags ^= SDL_FULLSCREEN;
|
||||
found_matching = preferences::detect_video_settings(video_, resolution, bpp, video_flags);
|
||||
if (found_matching) {
|
||||
std::cerr << "Failed to set " << resolution.first << 'x' << resolution.second << 'x' << bpp << " in fullscreen mode. Using windowed instead.\n";
|
||||
|
|
|
@ -64,7 +64,7 @@ display_manager::~display_manager()
|
|||
|
||||
bool detect_video_settings(CVideo& video, std::pair<int,int>& resolution, int& bpp, int& video_flags)
|
||||
{
|
||||
video_flags = fullscreen() ? FULL_SCREEN : 0;
|
||||
video_flags = fullscreen() ? SDL_FULLSCREEN : 0;
|
||||
resolution = preferences::resolution();
|
||||
|
||||
int DefaultBPP = 24;
|
||||
|
@ -113,7 +113,7 @@ void set_fullscreen(CVideo& video, const bool ison)
|
|||
|
||||
const std::pair<int,int>& res = resolution();
|
||||
if(video.isFullScreen() != ison) {
|
||||
const int flags = ison ? FULL_SCREEN : 0;
|
||||
const int flags = ison ? SDL_FULLSCREEN : 0;
|
||||
int bpp = video.bppForMode(res.first, res.second, flags);
|
||||
|
||||
if(bpp > 0) {
|
||||
|
@ -172,7 +172,7 @@ bool set_resolution(CVideo& video
|
|||
return true;
|
||||
}
|
||||
|
||||
const int flags = fullscreen() ? FULL_SCREEN : 0;
|
||||
const int flags = fullscreen() ? SDL_FULLSCREEN : 0;
|
||||
int bpp = video.bppForMode(width, height, flags);
|
||||
|
||||
if(bpp != 0) {
|
||||
|
|
|
@ -561,7 +561,7 @@ int CVideo::setMode( int x, int y, int bits_per_pixel, int flags )
|
|||
|
||||
flags = get_flags(flags);
|
||||
|
||||
fullScreen = (flags & FULL_SCREEN) != 0;
|
||||
fullScreen = (flags & SDL_FULLSCREEN) != 0;
|
||||
|
||||
if(!window) {
|
||||
// SDL_WINDOWPOS_UNDEFINED allows SDL to centre the window in the display instead of using a fixed initial position.
|
||||
|
@ -595,13 +595,13 @@ int CVideo::setMode( int x, int y, int bits_per_pixel, int flags )
|
|||
flags = get_flags(flags);
|
||||
const int res = SDL_VideoModeOK( x, y, bits_per_pixel, flags );
|
||||
#ifdef SDL_GPU
|
||||
const bool toggle_fullscreen = ((flags & FULL_SCREEN) != 0) != fullScreen;
|
||||
const bool toggle_fullscreen = ((flags & SDL_FULLSCREEN) != 0) != fullScreen;
|
||||
#endif
|
||||
|
||||
if( res == 0 )
|
||||
return 0;
|
||||
|
||||
fullScreen = (flags & FULL_SCREEN) != 0;
|
||||
fullScreen = (flags & SDL_FULLSCREEN) != 0;
|
||||
#ifdef SDL_GPU
|
||||
//NOTE: this surface is in fact unused now. Can be removed when possible.
|
||||
frameBuffer = SDL_CreateRGBSurface(SDL_SWSURFACE, x, y, 32,
|
||||
|
@ -782,9 +782,9 @@ std::vector<std::pair<int, int> > CVideo::get_available_resolutions()
|
|||
if (const surface& surf = getSurface()) {
|
||||
SDL_PixelFormat format = *surf->format;
|
||||
format.BitsPerPixel = getBpp();
|
||||
modes = SDL_ListModes(&format, FULL_SCREEN);
|
||||
modes = SDL_ListModes(&format, SDL_FULLSCREEN);
|
||||
} else
|
||||
modes = SDL_ListModes(NULL, FULL_SCREEN);
|
||||
modes = SDL_ListModes(NULL, SDL_FULLSCREEN);
|
||||
|
||||
// The SDL documentation says that a return value of -1
|
||||
// means that all dimensions are supported/possible.
|
||||
|
|
|
@ -36,8 +36,6 @@ class timage;
|
|||
#endif
|
||||
|
||||
//possible flags when setting video modes
|
||||
#define FULL_SCREEN SDL_FULLSCREEN
|
||||
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
#define SDL_APPMOUSEFOCUS 0x01 /**< The app has mouse coverage */
|
||||
#define SDL_APPINPUTFOCUS 0x02 /**< The app has input focus */
|
||||
|
|
Loading…
Add table
Reference in a new issue