diff --git a/polymer/eduke32/build/include/build.h b/polymer/eduke32/build/include/build.h index 92f79ae44..33136a379 100644 --- a/polymer/eduke32/build/include/build.h +++ b/polymer/eduke32/build/include/build.h @@ -16,7 +16,7 @@ extern "C" { #endif -enum { +enum rendmode_t { REND_CLASSIC, REND_POLYMOST = 3, REND_POLYMER @@ -579,7 +579,7 @@ EXTERN int32_t editorzrange[2]; static inline int32_t getrendermode(void) { #ifndef USE_OPENGL - return 0; + return REND_CLASSIC; #else return rendmode; #endif diff --git a/polymer/eduke32/build/src/baselayer.c b/polymer/eduke32/build/src/baselayer.c index 6f8928b4b..effc3cc96 100644 --- a/polymer/eduke32/build/src/baselayer.c +++ b/polymer/eduke32/build/src/baselayer.c @@ -215,19 +215,27 @@ static int32_t osdfunc_setrendermode(const osdfuncparm_t *parm) int32_t m; char *p; - const char *modestrs[] = - { - "classic software", "", - "", "polygonal OpenGL", "great justice (Polymer)" - }; - if (parm->numparms != 1) return OSDCMD_SHOWHELP; m = Bstrtol(parm->parms[0], &p, 10); - if (m < 0 || m > 4) return OSDCMD_SHOWHELP; + if (m < REND_CLASSIC || m > REND_POLYMER) return OSDCMD_SHOWHELP; setrendermode(m); - OSD_Printf("Rendering method changed to %s\n", modestrs[ getrendermode()]); + + switch(getrendermode()) + { + case REND_CLASSIC: + p = "classic software"; + break; + case REND_POLYMOST: + p = "polygonal OpenGL"; + break; + case REND_POLYMER: + p = "great justice (Polymer)"; + break; + } + + OSD_Printf("Rendering method changed to %s\n", p); return OSDCMD_OK; }