summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/doom/d_main.c2
-rw-r--r--src/heretic/d_main.c1
-rw-r--r--src/hexen/h2_main.c1
-rw-r--r--src/i_main.c2
-rw-r--r--src/i_sdlsound.c14
-rw-r--r--src/setup/display.c11
-rw-r--r--src/setup/keyboard.c6
-rw-r--r--src/strife/d_main.c2
8 files changed, 22 insertions, 17 deletions
diff --git a/src/doom/d_main.c b/src/doom/d_main.c
index 2f116f1e..991907fa 100644
--- a/src/doom/d_main.c
+++ b/src/doom/d_main.c
@@ -1100,8 +1100,6 @@ void D_DoomMain (void)
I_AtExit(D_Endoom, false);
- M_FindResponseFile ();
-
// print banner
I_PrintBanner(PACKAGE_STRING);
diff --git a/src/heretic/d_main.c b/src/heretic/d_main.c
index 169a86ea..5c2d5cf2 100644
--- a/src/heretic/d_main.c
+++ b/src/heretic/d_main.c
@@ -805,7 +805,6 @@ void D_DoomMain(void)
I_AtExit(D_Endoom, false);
- M_FindResponseFile();
nomonsters = M_CheckParm("-nomonsters");
respawnparm = M_CheckParm("-respawn");
ravpic = M_CheckParm("-ravpic");
diff --git a/src/hexen/h2_main.c b/src/hexen/h2_main.c
index abc58f15..4f9fe312 100644
--- a/src/hexen/h2_main.c
+++ b/src/hexen/h2_main.c
@@ -232,7 +232,6 @@ void D_DoomMain(void)
int p;
I_AtExit(D_HexenQuitMessage, false);
- M_FindResponseFile();
startepisode = 1;
autostart = false;
startskill = sk_medium;
diff --git a/src/i_main.c b/src/i_main.c
index 1ccc52c0..fdfa3cbc 100644
--- a/src/i_main.c
+++ b/src/i_main.c
@@ -154,6 +154,8 @@ int main(int argc, char **argv)
LockCPUAffinity();
+ M_FindResponseFile();
+
// start doom
D_DoomMain ();
diff --git a/src/i_sdlsound.c b/src/i_sdlsound.c
index 03e9d85b..e3118a82 100644
--- a/src/i_sdlsound.c
+++ b/src/i_sdlsound.c
@@ -664,11 +664,23 @@ static boolean CacheSFX(sfxinfo_t *sfxinfo)
// If the header specifies that the length of the sound is greater than
// the length of the lump itself, this is an invalid sound lump
- if (length > lumplen - 8)
+ // We also discard sound lumps that are less than 49 samples long,
+ // as this is how DMX behaves - although the actual cut-off length
+ // seems to vary slightly depending on the sample rate. This needs
+ // further investigation to better understand the correct
+ // behavior.
+
+ if (length > lumplen - 8 || length <= 48)
{
return false;
}
+ // The DMX sound library seems to skip the first 16 and last 16
+ // bytes of the lump - reason unknown.
+
+ data += 16;
+ length -= 32;
+
// Sample rate conversion
if (!ExpandSoundData(sfxinfo, data + 8, samplerate, length))
diff --git a/src/setup/display.c b/src/setup/display.c
index f5f190f2..9ed0ae5f 100644
--- a/src/setup/display.c
+++ b/src/setup/display.c
@@ -257,9 +257,7 @@ static int GetSupportedBPPIndex(char *description)
}
}
- // Shouldn't happen; fall back to the first in the list.
-
- return 0;
+ return -1;
}
// Set selected_bpp to match screen_bpp.
@@ -277,7 +275,11 @@ static int TrySetSelectedBPP(void)
if (pixel_depths[i].bpp == screen_bpp)
{
selected_bpp = GetSupportedBPPIndex(pixel_depths[i].description);
- return 1;
+
+ if (selected_bpp >= 0)
+ {
+ return 1;
+ }
}
}
@@ -715,6 +717,7 @@ void BindDisplayVariables(void)
M_BindVariable("fullscreen", &fullscreen);
M_BindVariable("screen_width", &screen_width);
M_BindVariable("screen_height", &screen_height);
+ M_BindVariable("screen_bpp", &screen_bpp);
M_BindVariable("startup_delay", &startup_delay);
M_BindVariable("video_driver", &video_driver);
M_BindVariable("usegamma", &usegamma);
diff --git a/src/setup/keyboard.c b/src/setup/keyboard.c
index 7ee523bb..46ef05c2 100644
--- a/src/setup/keyboard.c
+++ b/src/setup/keyboard.c
@@ -314,12 +314,6 @@ static void OtherKeysDialog(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(unused))
AddKeyControl(table, "- to brown", &key_multi_msgplayer[2]);
AddKeyControl(table, "- to red", &key_multi_msgplayer[3]);
- TXT_AddWidgets(table, TXT_NewStrut(0, 1),
- TXT_NewStrut(0, 1),
- TXT_NewLabel(" - Map - "),
- TXT_NewStrut(0, 0),
- NULL);
-
scrollpane = TXT_NewScrollPane(0, 13, table);
TXT_AddWidget(window, scrollpane);
diff --git a/src/strife/d_main.c b/src/strife/d_main.c
index 6367818a..663d2028 100644
--- a/src/strife/d_main.c
+++ b/src/strife/d_main.c
@@ -1377,8 +1377,6 @@ void D_DoomMain (void)
I_AtExit(D_Endoom, false);
- M_FindResponseFile ();
-
// haleyjd 20110206 [STRIFE]: -nograph parameter
//!