From 05aba7adb84afae3a6e495d593466468e54cc1c9 Mon Sep 17 00:00:00 2001 From: Ketmar Dark Date: Mon, 14 Aug 2017 18:33:55 +0300 Subject: [PATCH] "--opengl-dump-exts" cli arg fix --- src/game/g_game.pas | 3 --- src/game/g_window.pas | 8 ++++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/game/g_game.pas b/src/game/g_game.pas index 68b2ee4..963f8ae 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -6485,9 +6485,6 @@ var begin Parse_Params(pars); - s := Find_Param_Value(pars, '--opengl-dump-exts'); - if s <> '' then gwin_dump_extensions := true; // sorry - // Debug mode: s := Find_Param_Value(pars, '--debug'); if (s <> '') then diff --git a/src/game/g_window.pas b/src/game/g_window.pas index 6ffa8ff..9d27d57 100644 --- a/src/game/g_window.pas +++ b/src/game/g_window.pas @@ -685,6 +685,8 @@ begin end; function SDLMain(): Integer; +var + idx: Integer; begin {$IFDEF HEADLESS} e_NoGraphics := True; @@ -702,6 +704,11 @@ begin {EnumDisplayModes();} + for idx := 1 to ParamCount do + begin + if ParamStr(idx) = '--opengl-dump-exts' then gwin_dump_extensions := true; + end; + if not glHasExtension('GL_ARB_texture_non_power_of_two') then begin e_WriteLog('Driver DID''T advertised NPOT textures support', MSG_WARNING); @@ -712,6 +719,7 @@ begin e_WriteLog('Driver advertised NPOT textures support', MSG_NOTIFY); glLegacyNPOT := false; end; + gwin_dump_extensions := false; Init(); Time_Old := GetTimer(); -- 2.29.2