12 changes: 6 additions & 6 deletions src/shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ ShaderInfo generate_shader(std::string name, IrrlichtDevice *device,
Load shader programs
*/
void load_shaders(std::string name, SourceShaderCache *sourcecache,
video::E_DRIVER_TYPE drivertype, s32 enable_shaders,
video::E_DRIVER_TYPE drivertype, bool enable_shaders,
std::string &vertex_program, std::string &pixel_program,
std::string &geometry_program, bool &is_highlevel);

Expand Down Expand Up @@ -625,8 +625,8 @@ ShaderInfo generate_shader(std::string name, IrrlichtDevice *device,
}

// 0 = off, 1 = assembly shaders only, 2 = highlevel or assembly
s32 enable_shaders = g_settings->getS32("enable_shaders");
if(enable_shaders <= 0)
bool enable_shaders = g_settings->getBool("enable_shaders");
if(!enable_shaders)
return shaderinfo;

video::IVideoDriver* driver = device->getVideoDriver();
Expand Down Expand Up @@ -748,7 +748,7 @@ ShaderInfo generate_shader(std::string name, IrrlichtDevice *device,
}

void load_shaders(std::string name, SourceShaderCache *sourcecache,
video::E_DRIVER_TYPE drivertype, s32 enable_shaders,
video::E_DRIVER_TYPE drivertype, bool enable_shaders,
std::string &vertex_program, std::string &pixel_program,
std::string &geometry_program, bool &is_highlevel)
{
Expand All @@ -757,7 +757,7 @@ void load_shaders(std::string name, SourceShaderCache *sourcecache,
geometry_program = "";
is_highlevel = false;

if(enable_shaders >= 2){
if(enable_shaders){
// Look for high level shaders
if(drivertype == video::EDT_DIRECT3D9){
// Direct3D 9: HLSL
Expand All @@ -778,7 +778,7 @@ void load_shaders(std::string name, SourceShaderCache *sourcecache,
}
}

if(enable_shaders >= 1){
if(enable_shaders){
// Look for assembly shaders
if(drivertype == video::EDT_DIRECT3D8){
// Direct3D 8 assembly shaders
Expand Down