Ticket #1419: GameSetup.cpp.patch

File GameSetup.cpp.patch, 3.6 KB (added by Michael Laporte, 11 years ago)
  • source/ps/GameSetup/GameSetup.cpp

     
    2626#include "lib/file/common/file_stats.h"
    2727#include "lib/res/h_mgr.h"
    2828#include "lib/res/graphics/cursor.h"
     29
    2930#include "lib/sysdep/cursor.h"
    3031#include "lib/sysdep/cpu.h"
    3132#include "lib/sysdep/gfx.h"
    3233#include "lib/sysdep/os_cpu.h"
    33 #include "lib/tex/tex.h"
     34#include "lib/sysdep/sysdep.h"
    3435#if OS_WIN
    3536#include "lib/sysdep/os/win/wversion.h"
    3637#endif
    3738
     39#include "lib/tex/tex.h"
     40
    3841#include "graphics/CinemaTrack.h"
    3942#include "graphics/GameView.h"
    4043#include "graphics/LightEnv.h"
     
    984987        ISoundManager::SetEnabled(false);
    985988
    986989    g_GUI = new CGUIManager(g_ScriptingHost.GetScriptInterface());
     990   
    987991
     992    wchar_t buf[500];
     993    wchar_t caption[128];
    988994    // (must come after SetVideoMode, since it calls ogl_Init)
    989995    if (ogl_HaveExtensions(0, "GL_ARB_vertex_program", "GL_ARB_fragment_program", NULL) != 0 // ARB
    990996        && ogl_HaveExtensions(0, "GL_ARB_vertex_shader", "GL_ARB_fragment_shader", NULL) != 0) // GLSL
    991997    {
    992         DEBUG_DISPLAY_ERROR(
    993             L"Your graphics card doesn't appear to be fully compatible with OpenGL shaders."
    994             L" In the future, the game will not support pre-shader graphics cards."
    995             L" You are advised to try installing newer drivers and/or upgrade your graphics card."
     998
     999        swprintf_s(buf, ARRAY_SIZE(buf),
     1000            L"Your graphics card doesn't appear to be fully compatible with OpenGL shaders.\n"
     1001            L" In the future, the game will not support pre-shader graphics cards.\n\n"
     1002            L" You are advised to try installing newer drivers and/or upgrade your graphics card.\n\n"
    9961003            L" For more information, please see http://www.wildfiregames.com/forum/index.php?showtopic=16734"
    997         );
     1004            );
     1005        swprintf_s(caption,ARRAY_SIZE(caption),L"No OpenGL shaders!");
     1006        sys_display_msg(caption,buf);
    9981007        // TODO: actually quit once fixed function support is dropped
    9991008    }
    10001009
     
    10061015        NULL);
    10071016    if(missing)
    10081017    {
    1009         wchar_t buf[500];
     1018       
    10101019        swprintf_s(buf, ARRAY_SIZE(buf),
    1011             L"The %hs extension doesn't appear to be available on your computer."
    1012             L" The game may still work, though - you are welcome to try at your own risk."
    1013             L" If not or it doesn't look right, upgrade your graphics card.",
     1020            L"The %hs extension doesn't appear to be available on your computer.\n"
     1021            L" The game may still work, though - you are welcome to try at your own risk.\n\n"
     1022            L" If not or it doesn't look right, upgrade your graphics card.\n",
    10141023            missing
    10151024        );
    1016         DEBUG_DISPLAY_ERROR(buf);
     1025        swprintf_s(caption,ARRAY_SIZE(caption),L"Missing %hs extension!",missing);
     1026        sys_display_msg(caption,buf);
    10171027        // TODO: i18n
    10181028    }
    10191029
    10201030    if (!ogl_HaveExtension("GL_ARB_texture_env_crossbar"))
    10211031    {
    1022         DEBUG_DISPLAY_ERROR(
    1023             L"The GL_ARB_texture_env_crossbar extension doesn't appear to be available on your computer."
    1024             L" Shadows are not available and overall graphics quality might suffer."
    1025             L" You are advised to try installing newer drivers and/or upgrade your graphics card.");
     1032
     1033        swprintf_s(caption,ARRAY_SIZE(caption),L"Missing GL_ARB_texture_env_crossbar extension!");
     1034        swprintf_s(buf,ARRAY_SIZE(buf),
     1035            L"The GL_ARB_texture_env_crossbar extension doesn't appear to be available on your computer.\n"
     1036            L" Shadows are not available and overall graphics quality might suffer.\n\n"
     1037            L" You are advised to try installing newer drivers and/or upgrade your graphics card."
     1038        );
     1039        sys_display_msg(caption,buf);
     1040
    10261041        g_Shadows = false;
    10271042    }
    10281043
    10291044    ogl_WarnIfError();
     1045   
    10301046    InitRenderer();
    10311047
    10321048    InitInput();