From aa4f489d72d174a2bce326a87cb3ca12bafa2d79 Mon Sep 17 00:00:00 2001 From: kervala Date: Thu, 3 Dec 2015 14:33:32 +0100 Subject: [PATCH] Fixed: Anisotropic Filtering 2x didn't work --- code/ryzom/client/src/interface_v3/action_handler_game.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/action_handler_game.cpp b/code/ryzom/client/src/interface_v3/action_handler_game.cpp index bff77eb7f..e92db8e44 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -3517,6 +3517,7 @@ class CHandlerGameConfigApply : public IActionHandler } // **** Apply Anisotropic Filtering + // read value from DB, it's a combo so value is the index of text sint nAnisotropic = NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_ANISOTROPIC_DB )->getValue32(); if (nAnisotropic >= 0) @@ -3526,9 +3527,9 @@ class CHandlerGameConfigApply : public IActionHandler // compute the real anisotropic value if (nAnisotropic > 0) { - anisotropic = 1; + anisotropic = 2; - for(size_t i = 0; i < nAnisotropic; ++i) + for(size_t i = 1; i < nAnisotropic; ++i) { anisotropic <<= 1; } @@ -3538,7 +3539,7 @@ class CHandlerGameConfigApply : public IActionHandler if (ClientCfg.AnisotropicFilter != anisotropic) { ClientCfg.AnisotropicFilter = anisotropic; - ClientCfg.writeInt("AnisotropicFilter", anisotropic); + ClientCfg.writeInt("AnisotropicFilter", ClientCfg.AnisotropicFilter); requestReboot = true; } }