diff options
author | bunnei <bunneidev@gmail.com> | 2015-05-14 05:29:27 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2015-05-23 04:59:42 +0200 |
commit | 1b42d55a9dcb27ac2374de0ed0d1d0ec8385b13e (patch) | |
tree | c21e1e3b667abbe498e1ab818c25988095cd0dbf /src/video_core/renderer_opengl/pica_to_gl.h | |
parent | Merge pull request #803 from lioncash/typo (diff) | |
download | yuzu-1b42d55a9dcb27ac2374de0ed0d1d0ec8385b13e.tar yuzu-1b42d55a9dcb27ac2374de0ed0d1d0ec8385b13e.tar.gz yuzu-1b42d55a9dcb27ac2374de0ed0d1d0ec8385b13e.tar.bz2 yuzu-1b42d55a9dcb27ac2374de0ed0d1d0ec8385b13e.tar.lz yuzu-1b42d55a9dcb27ac2374de0ed0d1d0ec8385b13e.tar.xz yuzu-1b42d55a9dcb27ac2374de0ed0d1d0ec8385b13e.tar.zst yuzu-1b42d55a9dcb27ac2374de0ed0d1d0ec8385b13e.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/pica_to_gl.h')
-rw-r--r-- | src/video_core/renderer_opengl/pica_to_gl.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/pica_to_gl.h b/src/video_core/renderer_opengl/pica_to_gl.h index 8369c649e..f8763e71b 100644 --- a/src/video_core/renderer_opengl/pica_to_gl.h +++ b/src/video_core/renderer_opengl/pica_to_gl.h @@ -41,7 +41,7 @@ inline GLenum WrapMode(Pica::Regs::TextureConfig::WrapMode mode) { return gl_mode; } -inline GLenum BlendFunc(u32 factor) { +inline GLenum BlendFunc(Pica::Regs::BlendFactor factor) { static const GLenum blend_func_table[] = { GL_ZERO, // BlendFactor::Zero GL_ONE, // BlendFactor::One @@ -61,17 +61,17 @@ inline GLenum BlendFunc(u32 factor) { }; // Range check table for input - if (factor >= ARRAY_SIZE(blend_func_table)) { + if ((unsigned)factor >= ARRAY_SIZE(blend_func_table)) { LOG_CRITICAL(Render_OpenGL, "Unknown blend factor %d", factor); UNREACHABLE(); return GL_ONE; } - return blend_func_table[factor]; + return blend_func_table[(unsigned)factor]; } -inline GLenum CompareFunc(u32 func) { +inline GLenum CompareFunc(Pica::Regs::CompareFunc func) { static const GLenum compare_func_table[] = { GL_NEVER, // CompareFunc::Never GL_ALWAYS, // CompareFunc::Always @@ -84,14 +84,14 @@ inline GLenum CompareFunc(u32 func) { }; // Range check table for input - if (func >= ARRAY_SIZE(compare_func_table)) { + if ((unsigned)func >= ARRAY_SIZE(compare_func_table)) { LOG_CRITICAL(Render_OpenGL, "Unknown compare function %d", func); UNREACHABLE(); return GL_ALWAYS; } - return compare_func_table[func]; + return compare_func_table[(unsigned)func]; } inline std::array<GLfloat, 4> ColorRGBA8(const u8* bytes) { |