Fixed some command-line options
This commit is contained in:
parent
487d3c55a9
commit
95533db358
|
@ -3,6 +3,7 @@ D2X-Rebirth Changelog
|
|||
20070112
|
||||
--------
|
||||
arch/linux/arch_ip.cpp, main/ip_base.cpp, main/ip_base.h, main/ipclient.cpp: Fixed port deformation while sending handshake
|
||||
d2x.ini, arch/sdl/digi.c, arch/sdl/digi_audio.c, main/inferno.c, main/menu.c, main/args.c: Fixed some command-line options
|
||||
|
||||
20071011
|
||||
--------
|
||||
|
|
|
@ -110,7 +110,6 @@ void digi_select_system(int n) {
|
|||
static int digi_initialised = 0;
|
||||
static int digi_max_channels = 16;
|
||||
|
||||
int digi_sample_rate = SAMPLE_RATE_22K;
|
||||
int digi_volume = SOUND_MAX_VOLUME;
|
||||
int midi_volume = SOUND_MAX_VOLUME;
|
||||
|
||||
|
@ -121,7 +120,7 @@ void digi_set_volume(int dvolume, int mvolume) {
|
|||
if (fptr_set_midi_volume) digi_set_midi_volume(mvolume);
|
||||
}
|
||||
|
||||
void digi_set_sample_rate(int r) { digi_sample_rate = r; }
|
||||
void digi_set_sample_rate(int r) { GameArg.SndDigiSampleRate = r; }
|
||||
|
||||
/* Stub functions */
|
||||
|
||||
|
|
|
@ -196,7 +196,7 @@ int digi_audio_init()
|
|||
Error("SDL audio initialisation failed: %s.",SDL_GetError());
|
||||
}
|
||||
|
||||
WaveSpec.freq = digi_sample_rate;
|
||||
WaveSpec.freq = GameArg.SndDigiSampleRate;
|
||||
//added/changed by Sam Lantinga on 12/01/98 for new SDL version
|
||||
WaveSpec.format = AUDIO_U8;
|
||||
WaveSpec.channels = 2;
|
||||
|
|
1
d2x.ini
1
d2x.ini
|
@ -34,7 +34,6 @@
|
|||
;-aspect<Y>x<X> use specified aspect
|
||||
;-hud <n> Set hud mode. 0=normal 1-3=new
|
||||
;-persistentdebris Enable persistent debris. Works in singleplayer only
|
||||
;-window Run the game in a window
|
||||
;-lowresmovies Play low resolution movies if available (for slow machines)
|
||||
;-subtitles Turn on movie subtitles
|
||||
|
||||
|
|
|
@ -355,13 +355,12 @@ int main(int argc, char *argv[])
|
|||
|
||||
key_init();
|
||||
|
||||
if (!GameArg.SndNoSound) {
|
||||
digi_select_system(
|
||||
GameArg.SndSdlMixer || GameArg.SndExternalMusic || GameArg.SndJukebox ?
|
||||
SDLMIXER_SYSTEM : SDLAUDIO_SYSTEM
|
||||
);
|
||||
digi_select_system(
|
||||
GameArg.SndSdlMixer || GameArg.SndExternalMusic || GameArg.SndJukebox ?
|
||||
SDLMIXER_SYSTEM : SDLAUDIO_SYSTEM
|
||||
);
|
||||
if (!GameArg.SndNoSound)
|
||||
digi_init();
|
||||
}
|
||||
|
||||
if (!GameArg.CtlNoMouse)
|
||||
d_mouse_init();
|
||||
|
|
|
@ -179,7 +179,7 @@ void autodemo_menu_check(int nitems, newmenu_item * items, int *last_key, int ci
|
|||
n_demos = newdemo_count_demos();
|
||||
|
||||
try_again:;
|
||||
if ((d_rand() % (n_demos+1)) == 0)
|
||||
if (((d_rand() % (n_demos+1)) == 0) && !GameArg.SysAutoDemo)
|
||||
{
|
||||
#ifndef SHAREWARE
|
||||
#ifdef OGL
|
||||
|
|
|
@ -186,6 +186,11 @@ void ReadCmdArgs(void)
|
|||
else
|
||||
GameArg.SysPilot = NULL;
|
||||
|
||||
if (FindArg("-autodemo"))
|
||||
GameArg.SysAutoDemo = 1;
|
||||
else
|
||||
GameArg.SysAutoDemo = 0;
|
||||
|
||||
if (FindArg("-window"))
|
||||
GameArg.SysWindow = 1;
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue