icculus / mojoshader

Use Direct3D shaders with other 3D rendering APIs.
https://icculus.org/mojoshader/
zlib License
122 stars 36 forks source link

MSVC compile fix #18

Closed TheSpydog closed 4 years ago

TheSpydog commented 4 years ago

MojoShader cannot be compiled with MSVC due to a variable initialization inside of a switch statement. This patch fixes the issue and also removes a redundant check. (If the code reaches this point, we can be sure support_glsles(ctx) is false, otherwise we would have already broken out of the switch.)

flibitijibibo commented 4 years ago

lgtm, send an hg diff and I’ll push.

TheSpydog commented 4 years ago

msvc-fix.diff.zip

flibitijibibo commented 4 years ago

Pushed: https://hg.icculus.org/icculus/mojoshader/rev/c6e847dd9d4b