Skip to content

Commit

Permalink
minor backend update.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Dec 28, 2023
1 parent 542997a commit d352f56
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,7 @@ set (PCH_SOURCES
common/2d/v_drawtext.cpp
common/2d/v_draw.cpp
common/2d/wipe.cpp
common/thirdparty/animlib.cpp
common/thirdparty/gain_analysis.cpp
common/thirdparty/sfmt/SFMT.cpp
common/startscreen/startscreen.cpp
Expand Down Expand Up @@ -1061,7 +1062,6 @@ set (PCH_SOURCES
common/textures/skyboxtexture.cpp
common/textures/animtexture.cpp
common/textures/v_collection.cpp
common/textures/animlib.cpp
common/textures/formats/automaptexture.cpp
common/textures/formats/brightmaptexture.cpp
common/textures/formats/buildtexture.cpp
Expand Down
3 changes: 2 additions & 1 deletion source/common/audio/music/music.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,6 @@ bool S_ChangeMusic(const char* musicname, int order, bool looping, bool force)
}

ZMusic_MusicStream handle = nullptr;
MidiDeviceSetting* devp = MidiDevices.CheckKey(musicname);

// Strip off any leading file:// component.
if (strncmp(musicname, "file://", 7) == 0)
Expand Down Expand Up @@ -751,6 +750,8 @@ bool S_ChangeMusic(const char* musicname, int order, bool looping, bool force)
else
{
int lumpnum = mus_cb.FindMusic(musicname);
MidiDeviceSetting* devp = MidiDevices.CheckKey(lumpnum);

auto volp = MusicVolumes.CheckKey(lumpnum);
if (volp)
{
Expand Down
2 changes: 1 addition & 1 deletion source/common/audio/music/s_music.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ struct MidiDeviceSetting
FString args;
};

typedef TMap<FName, MidiDeviceSetting> MidiDeviceMap;
typedef TMap<int, MidiDeviceSetting> MidiDeviceMap;
typedef TMap<int, float> MusicVolumeMap;

extern MidiDeviceMap MidiDevices;
Expand Down
3 changes: 2 additions & 1 deletion source/common/rendering/v_video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ CUSTOM_CVAR(Int, vid_preferbackend, 1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_N
{
#ifdef HAVE_GLES2
case 3:
case 2:
self = 2;
return; // beware of recursions here. Assigning to 'self' will recursively call this handler again.
case 2:
Printf("Selecting OpenGLES 2.0 backend...\n");
break;
#endif
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions source/core/music/s_advsound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ static void S_AddSNDINFO (int lump)

case SI_MidiDevice: {
sc.MustGetString();
FName nm = sc.String;
int lumpnum = mus_cb.FindMusic(sc.String);
FScanner::SavedPos save = sc.SavePos();

sc.SetCMode(true);
Expand Down Expand Up @@ -310,7 +310,7 @@ static void S_AddSNDINFO (int lump)
sc.RestorePos(save);
sc.MustGetString();
}
MidiDevices[nm] = devset;
if (lumpnum >= 0) MidiDevices[lumpnum] = devset;
}
break;

Expand Down

0 comments on commit d352f56

Please sign in to comment.