mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-17 11:28:16 +00:00
Remove unneeded members of game_controller
This commit is contained in:
parent
4345f2cf13
commit
0e02d1d762
16
src/game.cpp
16
src/game.cpp
@ -215,10 +215,6 @@ private:
|
|||||||
|
|
||||||
game_state state_;
|
game_state state_;
|
||||||
|
|
||||||
std::pair<int,int> resolution; // FIXME
|
|
||||||
int bpp; // FIXME
|
|
||||||
int video_flags; // FIXME
|
|
||||||
|
|
||||||
std::string loaded_game_;
|
std::string loaded_game_;
|
||||||
bool loaded_game_show_replay_;
|
bool loaded_game_show_replay_;
|
||||||
bool loaded_game_cancel_orders_;
|
bool loaded_game_cancel_orders_;
|
||||||
@ -258,9 +254,6 @@ game_controller::game_controller(int argc, char** argv) :
|
|||||||
old_defines_map_(),
|
old_defines_map_(),
|
||||||
disp_(NULL),
|
disp_(NULL),
|
||||||
state_(),
|
state_(),
|
||||||
resolution(),
|
|
||||||
bpp(0),
|
|
||||||
video_flags(0),
|
|
||||||
loaded_game_(),
|
loaded_game_(),
|
||||||
loaded_game_show_replay_(false),
|
loaded_game_show_replay_(false),
|
||||||
loaded_game_cancel_orders_(false),
|
loaded_game_cancel_orders_(false),
|
||||||
@ -510,7 +503,16 @@ bool game_controller::init_video()
|
|||||||
|
|
||||||
image::set_wm_icon();
|
image::set_wm_icon();
|
||||||
|
|
||||||
|
std::pair<int,int> resolution;
|
||||||
|
int bpp = 0;
|
||||||
|
int video_flags = 0;
|
||||||
|
|
||||||
bool found_matching = preferences::detect_video_settings(video_, resolution, bpp, video_flags);
|
bool found_matching = preferences::detect_video_settings(video_, resolution, bpp, video_flags);
|
||||||
|
|
||||||
|
if(force_bpp_ > 0) {
|
||||||
|
bpp = force_bpp_;
|
||||||
|
}
|
||||||
|
|
||||||
if(!found_matching) {
|
if(!found_matching) {
|
||||||
std::cerr << "Video mode " << resolution.first << 'x'
|
std::cerr << "Video mode " << resolution.first << 'x'
|
||||||
<< resolution.second << 'x' << bpp
|
<< resolution.second << 'x' << bpp
|
||||||
|
@ -60,7 +60,6 @@ bool detect_video_settings(CVideo& video, std::pair<int,int>& resolution, int& b
|
|||||||
video_flags = fullscreen() ? FULL_SCREEN : 0;
|
video_flags = fullscreen() ? FULL_SCREEN : 0;
|
||||||
resolution = preferences::resolution();
|
resolution = preferences::resolution();
|
||||||
|
|
||||||
const int force_bpp = bpp;
|
|
||||||
int DefaultBPP = 24;
|
int DefaultBPP = 24;
|
||||||
const SDL_VideoInfo* const video_info = SDL_GetVideoInfo();
|
const SDL_VideoInfo* const video_info = SDL_GetVideoInfo();
|
||||||
if(video_info != NULL && video_info->vfmt != NULL) {
|
if(video_info != NULL && video_info->vfmt != NULL) {
|
||||||
@ -97,15 +96,7 @@ bool detect_video_settings(CVideo& video, std::pair<int,int>& resolution, int& b
|
|||||||
DefaultBPP, video_flags);
|
DefaultBPP, video_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bpp == 0) {
|
return bpp != 0;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(force_bpp > 0) {
|
|
||||||
bpp = force_bpp;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_fullscreen(CVideo& video, const bool ison)
|
void set_fullscreen(CVideo& video, const bool ison)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user