mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 23:42:11 +00:00
Merge branch 'master' into next
This commit is contained in:
commit
b056bf1d6c
2 changed files with 11 additions and 6 deletions
|
@ -1924,7 +1924,7 @@ EXPORT void HWRAPI(CreateModelVBOs) (model_t *model)
|
|||
}
|
||||
}
|
||||
|
||||
#define BUFFER_OFFSET(i) ((char*)NULL + (i))
|
||||
#define BUFFER_OFFSET(i) ((void*)(i))
|
||||
|
||||
static void DrawModelEx(model_t *model, INT32 frameIndex, INT32 duration, INT32 tics, INT32 nextFrameIndex, FTransform *pos, float scale, UINT8 flipped, UINT8 *color)
|
||||
{
|
||||
|
|
|
@ -880,13 +880,18 @@ boolean I_SetSongSpeed(float speed)
|
|||
#ifdef HAVE_OPENMPT
|
||||
if (openmpt_mhandle)
|
||||
{
|
||||
char modspd[13];
|
||||
|
||||
if (speed > 4.0f)
|
||||
speed = 4.0f; // Limit this to 4x to prevent crashing, stupid fix but... ~SteelT 27/9/19
|
||||
|
||||
sprintf(modspd, "%g", speed);
|
||||
openmpt_module_ctl_set(openmpt_mhandle, "play.tempo_factor", modspd);
|
||||
#if OPENMPT_API_VERSION_MAJOR < 1 && OPENMPT_API_VERSION_MINOR < 5
|
||||
{
|
||||
// deprecated in 0.5.0
|
||||
char modspd[13];
|
||||
sprintf(modspd, "%g", speed);
|
||||
openmpt_module_ctl_set(openmpt_mhandle, "play.tempo_factor", modspd);
|
||||
}
|
||||
#else
|
||||
openmpt_module_ctl_set_floatingpoint(openmpt_mhandle, "play.tempo_factor", (double)speed);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue