From: Ketmar Dark Date: Mon, 14 Aug 2017 15:33:55 +0000 (+0300) Subject: "--opengl-dump-exts" cli arg fix X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=05aba7adb84afae3a6e495d593466468e54cc1c9;p=d2df-sdl.git "--opengl-dump-exts" cli arg fix --- 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();