mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-26 11:48:36 +01:00
Merge pull request #5182 from sum2012/patch-2
Fix "Integer divide by zero" in Spline.cpp
This commit is contained in:
commit
f53ef47528
1 file changed
+2
@@ -816,6 +816,8 @@ void TransformDrawEngine::SubmitBezier(void* control_points, void* indices, int
|
||||
// Simple approximation of the real tesselation factor.
|
||||
// We shouldn't really split up into separate 4x4 patches, instead we should do something that works
|
||||
// like the splines, so we subdivide across the whole "mega-patch".
|
||||
if (num_patches_u == 0) num_patches_u = 1;
|
||||
if (num_patches_v == 0) num_patches_v = 1;
|
||||
int tess_u = gstate.getPatchDivisionU() / num_patches_u;
|
||||
int tess_v = gstate.getPatchDivisionV() / num_patches_v;
|
||||
if (tess_u < 4) tess_u = 4;
|
||||
|
||||
Reference in new issue
Block a user