From 38b8119eb7521c9380ba9ff63f69950a739cebff Mon Sep 17 00:00:00 2001 From: Steven Date: Mon, 23 Aug 2010 04:12:19 +0000 Subject: [PATCH] Set SDL_CDROM environment variable when using -cddev. Some doco updates. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@282 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Quake/Makefile | 2 +- Quake/cd_sdl.c | 8 ++++++ README.html | 10 ++++++- README.sgml | 9 +++++++ README.txt | 73 +++++++++++++++++++++++++++++++++----------------- 5 files changed, 76 insertions(+), 26 deletions(-) diff --git a/Quake/Makefile b/Quake/Makefile index 5b9e1d52..41d4fc25 100644 --- a/Quake/Makefile +++ b/Quake/Makefile @@ -221,7 +221,7 @@ debug: $(error Use "make DEBUG=1") install: quakespasm - mv quakespasm /usr/local/games/quake + cp quakespasm /usr/local/games/quake clean: rm -f $(shell find . \( -name '*~' -o -name '#*#' -o -name '*.o' -o -name '*.res' -o -name $(DEFAULT_TARGET) \) -print) diff --git a/Quake/cd_sdl.c b/Quake/cd_sdl.c index 9ff7473c..28d3fce5 100644 --- a/Quake/cd_sdl.c +++ b/Quake/cd_sdl.c @@ -27,6 +27,7 @@ #include "SDL.h" +#include "SDL_getenv.h" #ifndef SDL_INIT_CDROM @@ -393,10 +394,17 @@ void CDAudio_Update(void) int CDAudio_Init(void) { int i, x, sdl_num_drives; + char sdl_env_dev[] = "SDL_CDROM="; if (COM_CheckParm("-nocdaudio")) return -1; + if ((i = COM_CheckParm("-cddev")) != 0 && i < com_argc - 1) + { + strcat(sdl_env_dev, com_argv[i+1]); + putenv(sdl_env_dev); + } + if (SDL_InitSubSystem(SDL_INIT_CDROM) == -1) { Con_Printf("Couldn't init SDL cdrom: %s\n", SDL_GetError()); diff --git a/README.html b/README.html index f24aeda4..6d211a5d 100644 --- a/README.html +++ b/README.html @@ -74,6 +74,10 @@ It includes 64bit CPU cupport, a new sound driver, several networking fixes, and
  • Quakespasm allows loading new games (mods) on the fly with "game GAMENAME"
  • +
  • There is currently no music volume support. cd_sdl.c needs replacing with cd_linux.c, cd_bsd.c etc.. +
  • +
  • In windows, alternative CD drives are accessible by "quakespasm -cddev F:\" (for example) +
  • Visit the @@ -122,7 +126,8 @@ The process is not for the faint hearted.

  • Add a "prev weapon" menu item (from Sander)
  • Small fix to Sound Block/Unblock on win32
  • Lots of code fixes (some from uhexen2)
  • -
  • Sys_Error calls Host_Shutdown +
  • Sys_Error calls Host_Shutdown
  • +
  • Added MS Visual Studio support
  • @@ -176,6 +181,8 @@ The process is not for the faint hearted.