git-svn-id: https://svn.eduke32.com/eduke32@1110 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2008-10-22 04:14:30 +00:00
parent 21fef3e053
commit 60f1d42a94
5 changed files with 145 additions and 140 deletions

View file

@ -184,13 +184,14 @@ endif
OURCFLAGS+= $(BUILDCFLAGS) OURCFLAGS+= $(BUILDCFLAGS)
.SILENT:
.PHONY: clean veryclean all utils enginelib editorlib .PHONY: clean veryclean all utils enginelib editorlib
# TARGETS # TARGETS
UTILS=kextract$(EXESUFFIX) kgroup$(EXESUFFIX) transpal$(EXESUFFIX) wad2art$(EXESUFFIX) wad2map$(EXESUFFIX) UTILS=kextract$(EXESUFFIX) kgroup$(EXESUFFIX) transpal$(EXESUFFIX) wad2art$(EXESUFFIX) wad2map$(EXESUFFIX)
all: $(OBJ)/$(ENGINELIB) $(OBJ)/$(EDITORLIB) # all: $(OBJ)/$(ENGINELIB) $(OBJ)/$(EDITORLIB)
utils: $(UTILS) utils: $(UTILS)
enginelib: $(OBJ)/$(ENGINELIB) enginelib: $(OBJ)/$(ENGINELIB)

View file

@ -1544,7 +1544,7 @@ int handleevents(void)
break; break;
} }
break; break;
/* /*
case SDL_MOUSEWHEEL: case SDL_MOUSEWHEEL:
initprintf("wheel y %d\n",ev.wheel.y); initprintf("wheel y %d\n",ev.wheel.y);
if (ev.wheel.y > 0) if (ev.wheel.y > 0)
@ -1554,7 +1554,7 @@ int handleevents(void)
if (mousepresscallback) if (mousepresscallback)
mousepresscallback(5, 1); mousepresscallback(5, 1);
} }
if (ev.button.y < 0) if (ev.wheel.y < 0)
{ {
mwheeldown = totalclock; mwheeldown = totalclock;
mouseb |= 32; mouseb |= 32;

View file

@ -11442,12 +11442,15 @@ MAIN_LOOP_RESTART:
} }
{ {
static unsigned int lastrender = 0; static unsigned int nextrender = 0;
unsigned int j = getticks(); unsigned int j = getticks();
if (r_maxfps == 0 || j >= lastrender+g_FrameDelay) if (j > nextrender+g_FrameDelay)
nextrender = j;
if (r_maxfps == 0 || j >= nextrender)
{ {
lastrender = j; nextrender += g_FrameDelay;
displayrooms(screenpeek,i); displayrooms(screenpeek,i);
displayrest(i); displayrest(i);

View file

@ -74,7 +74,7 @@ Modifications for JonoF's port by Jonathon Fowler (jonof@edgenetwk.com)
#if defined(_WIN32) #if defined(_WIN32)
#define MixBufferSize (MV_GetBufferSize(MV_RequestedMixRate)) #define MixBufferSize (MV_GetBufferSize(MV_RequestedMixRate))
#else #else
#define MixBufferSize 512 #define MixBufferSize (scale(512, MV_RequestedMixRate, 11025))
#endif #endif
#define NumberOfBuffers 16 #define NumberOfBuffers 16

View file

@ -25,6 +25,7 @@ Adapted to work with JonoF's port by James Bentler (bentler@cs.umn.edu)
#include "dsl.h" #include "dsl.h"
#include "compat.h" #include "compat.h"
#include "pragmas.h"
#define _NEED_SDLMIXER 1 #define _NEED_SDLMIXER 1
#include "sdl_inc.h" #include "sdl_inc.h"
@ -190,10 +191,10 @@ int DSL_BeginBufferedPlayback(char *BufferStart,
46ms isn't bad 46ms isn't bad
*/ */
chunksize = 512; chunksize = scale(512, SampleRate, 11025);
if (SampleRate >= 16000) chunksize *= 2; // if (SampleRate >= 16000) chunksize *= 2;
if (SampleRate >= 32000) chunksize *= 2; // if (SampleRate >= 32000) chunksize *= 2;
/* /*
// SDL mixer does this already // SDL mixer does this already