mirror of
https://github.com/glest/glest-source.git
synced 2025-08-24 00:42:50 +02:00
- cleanup of masterserver global flag
- attempt to cut down on resources required for masterserver mode to minimize RAM
This commit is contained in:
@@ -65,7 +65,7 @@ void PlatformContextGl::init(int colorBits, int depthBits, int stencilBits,bool
|
||||
int resW = PlatformCommon::Private::ScreenWidth;
|
||||
int resH = PlatformCommon::Private::ScreenHeight;
|
||||
|
||||
if(Window::getMasterserverMode() == false) {
|
||||
if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false) {
|
||||
|
||||
#ifndef WIN32
|
||||
string mg_icon_file = "";
|
||||
@@ -162,7 +162,7 @@ void PlatformContextGl::init(int colorBits, int depthBits, int stencilBits,bool
|
||||
SDL_WM_GrabInput(SDL_GRAB_OFF);
|
||||
}
|
||||
|
||||
if(Window::getMasterserverMode() == false) {
|
||||
if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false) {
|
||||
GLuint err = glewInit();
|
||||
if (GLEW_OK != err) {
|
||||
fprintf(stderr, "Error [main]: glewInit failed: %s\n", glewGetErrorString(err));
|
||||
@@ -198,7 +198,7 @@ void PlatformContextGl::makeCurrent() {
|
||||
}
|
||||
|
||||
void PlatformContextGl::swapBuffers() {
|
||||
if(Window::getMasterserverMode() == false) {
|
||||
if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false) {
|
||||
SDL_GL_SwapBuffers();
|
||||
}
|
||||
}
|
||||
|
@@ -60,7 +60,7 @@ int Window::lastShowMouseState = 0;
|
||||
|
||||
bool Window::tryVSynch = false;
|
||||
|
||||
bool Window::masterserverMode = false;
|
||||
//bool Window::masterserverMode = false;
|
||||
|
||||
// ========== PUBLIC ==========
|
||||
|
||||
@@ -408,7 +408,7 @@ void Window::setupGraphicsScreen(int depthBits, int stencilBits, bool hardware_a
|
||||
if(stencilBits >= 0)
|
||||
newStencilBits = stencilBits;
|
||||
|
||||
if(Window::masterserverMode == false) {
|
||||
if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false) {
|
||||
if(fullscreen_anti_aliasing == true) {
|
||||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS,1);
|
||||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 2);
|
||||
@@ -456,7 +456,7 @@ void Window::toggleFullscreen() {
|
||||
Use 0 for Height, Width, and Color Depth to keep the current values. */
|
||||
|
||||
if(Window::allowAltEnterFullscreenToggle == true) {
|
||||
if(Window::masterserverMode == false) {
|
||||
if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false) {
|
||||
SDL_Surface *cur_surface = SDL_GetVideoSurface();
|
||||
if(cur_surface != NULL) {
|
||||
Window::isFullScreen = !((cur_surface->flags & SDL_FULLSCREEN) == SDL_FULLSCREEN);
|
||||
@@ -532,7 +532,7 @@ void Window::toggleFullscreen() {
|
||||
if(Window::allowAltEnterFullscreenToggle == true) {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
if(Window::masterserverMode == false) {
|
||||
if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false) {
|
||||
SDL_Surface *cur_surface = SDL_GetVideoSurface();
|
||||
if(cur_surface != NULL) {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
Reference in New Issue
Block a user