Skip to content

Commit d352f56

Browse files
committed
minor backend update.
1 parent 542997a commit d352f56

File tree

7 files changed

+8
-6
lines changed

7 files changed

+8
-6
lines changed

source/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,6 +1033,7 @@ set (PCH_SOURCES
10331033
common/2d/v_drawtext.cpp
10341034
common/2d/v_draw.cpp
10351035
common/2d/wipe.cpp
1036+
common/thirdparty/animlib.cpp
10361037
common/thirdparty/gain_analysis.cpp
10371038
common/thirdparty/sfmt/SFMT.cpp
10381039
common/startscreen/startscreen.cpp
@@ -1061,7 +1062,6 @@ set (PCH_SOURCES
10611062
common/textures/skyboxtexture.cpp
10621063
common/textures/animtexture.cpp
10631064
common/textures/v_collection.cpp
1064-
common/textures/animlib.cpp
10651065
common/textures/formats/automaptexture.cpp
10661066
common/textures/formats/brightmaptexture.cpp
10671067
common/textures/formats/buildtexture.cpp

source/common/audio/music/music.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,6 @@ bool S_ChangeMusic(const char* musicname, int order, bool looping, bool force)
716716
}
717717

718718
ZMusic_MusicStream handle = nullptr;
719-
MidiDeviceSetting* devp = MidiDevices.CheckKey(musicname);
720719

721720
// Strip off any leading file:// component.
722721
if (strncmp(musicname, "file://", 7) == 0)
@@ -751,6 +750,8 @@ bool S_ChangeMusic(const char* musicname, int order, bool looping, bool force)
751750
else
752751
{
753752
int lumpnum = mus_cb.FindMusic(musicname);
753+
MidiDeviceSetting* devp = MidiDevices.CheckKey(lumpnum);
754+
754755
auto volp = MusicVolumes.CheckKey(lumpnum);
755756
if (volp)
756757
{

source/common/audio/music/s_music.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ struct MidiDeviceSetting
6868
FString args;
6969
};
7070

71-
typedef TMap<FName, MidiDeviceSetting> MidiDeviceMap;
71+
typedef TMap<int, MidiDeviceSetting> MidiDeviceMap;
7272
typedef TMap<int, float> MusicVolumeMap;
7373

7474
extern MidiDeviceMap MidiDevices;

source/common/rendering/v_video.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,9 @@ CUSTOM_CVAR(Int, vid_preferbackend, 1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_N
103103
{
104104
#ifdef HAVE_GLES2
105105
case 3:
106-
case 2:
107106
self = 2;
107+
return; // beware of recursions here. Assigning to 'self' will recursively call this handler again.
108+
case 2:
108109
Printf("Selecting OpenGLES 2.0 backend...\n");
109110
break;
110111
#endif
File renamed without changes.

source/core/music/s_advsound.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ static void S_AddSNDINFO (int lump)
277277

278278
case SI_MidiDevice: {
279279
sc.MustGetString();
280-
FName nm = sc.String;
280+
int lumpnum = mus_cb.FindMusic(sc.String);
281281
FScanner::SavedPos save = sc.SavePos();
282282

283283
sc.SetCMode(true);
@@ -310,7 +310,7 @@ static void S_AddSNDINFO (int lump)
310310
sc.RestorePos(save);
311311
sc.MustGetString();
312312
}
313-
MidiDevices[nm] = devset;
313+
if (lumpnum >= 0) MidiDevices[lumpnum] = devset;
314314
}
315315
break;
316316

0 commit comments

Comments
 (0)