summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/reLCS_msvc_amd64.yml12
-rw-r--r--.github/workflows/reLCS_msvc_x86.yml12
-rw-r--r--premake5.lua26
-rw-r--r--src/audio/MusicManager.cpp10
-rw-r--r--src/audio/oal/stream.cpp6
-rw-r--r--src/core/Frontend.cpp8
6 files changed, 27 insertions, 47 deletions
diff --git a/.github/workflows/reLCS_msvc_amd64.yml b/.github/workflows/reLCS_msvc_amd64.yml
index 318c7e59..30e52a16 100644
--- a/.github/workflows/reLCS_msvc_amd64.yml
+++ b/.github/workflows/reLCS_msvc_amd64.yml
@@ -6,13 +6,9 @@ on:
release:
types: published
env:
- GLEW_VER: "2.1.0"
GLFW_VER: "3.3.2"
- GLEW_BASE: "glew-2.1.0"
GLFW_BASE: "glfw-3.3.2.bin.WIN64"
- GLEW_FILE: "glew-2.1.0-win32.zip"
GLFW_FILE: "glfw-3.3.2.bin.WIN64.zip"
- GLEW_URL: "https://github.com/nigels-com/glew/releases/download/glew-2.1.0/glew-2.1.0-win32.zip"
GLFW_URL: "https://github.com/glfw/glfw/releases/download/3.3.2/glfw-3.3.2.bin.WIN64.zip"
jobs:
build:
@@ -28,11 +24,6 @@ jobs:
with:
submodules: 'true'
- if: ${{ matrix.platform }} == "win-amd64-librw_gl3_glfw-mss"
- name: Download glew
- uses: carlosperate/download-file-action@v1.0.3
- with:
- file-url: ${{env.GLEW_URL}}
- - if: ${{ matrix.platform }} == "win-amd64-librw_gl3_glfw-mss"
name: Download glfw
uses: carlosperate/download-file-action@v1.0.3
with:
@@ -40,11 +31,10 @@ jobs:
- if: ${{ matrix.platform }} == "win-amd64-librw_gl3_glfw-mss"
name: Unpack archives
run: |
- 7z x ${{env.GLEW_FILE}}
7z x ${{env.GLFW_FILE}}
- name: Configure build
run: |
- ./premake5 vs2019 --with-librw --glewdir=${{env.GLEW_BASE}} --glfwdir64=${{env.GLFW_BASE}}
+ ./premake5 vs2019 --with-librw --glfwdir64=${{env.GLFW_BASE}}
- name: Build
run: |
msbuild -m build/reLCS.sln /property:Configuration=${{matrix.buildtype}} /property:Platform=${{matrix.platform}}
diff --git a/.github/workflows/reLCS_msvc_x86.yml b/.github/workflows/reLCS_msvc_x86.yml
index ef25aa7a..d34e47d5 100644
--- a/.github/workflows/reLCS_msvc_x86.yml
+++ b/.github/workflows/reLCS_msvc_x86.yml
@@ -6,13 +6,9 @@ on:
release:
types: published
env:
- GLEW_VER: "2.1.0"
GLFW_VER: "3.3.2"
- GLEW_BASE: "glew-2.1.0"
GLFW_BASE: "glfw-3.3.2.bin.WIN32"
- GLEW_FILE: "glew-2.1.0-win32.zip"
GLFW_FILE: "glfw-3.3.2.bin.WIN32.zip"
- GLEW_URL: "https://github.com/nigels-com/glew/releases/download/glew-2.1.0/glew-2.1.0-win32.zip"
GLFW_URL: "https://github.com/glfw/glfw/releases/download/3.3.2/glfw-3.3.2.bin.WIN32.zip"
jobs:
build:
@@ -28,11 +24,6 @@ jobs:
with:
submodules: 'true'
- if: ${{ matrix.platform }} == "win-x86-librw_gl3_glfw-mss"
- name: Download glew
- uses: carlosperate/download-file-action@v1.0.3
- with:
- file-url: ${{env.GLEW_URL}}
- - if: ${{ matrix.platform }} == "win-x86-librw_gl3_glfw-mss"
name: Download glfw
uses: carlosperate/download-file-action@v1.0.3
with:
@@ -40,11 +31,10 @@ jobs:
- if: ${{ matrix.platform }} == "win-x86-librw_gl3_glfw-mss"
name: Unpack archives
run: |
- 7z x ${{env.GLEW_FILE}}
7z x ${{env.GLFW_FILE}}
- name: Configure build
run: |
- ./premake5 vs2019 --with-librw --glewdir=${{env.GLEW_BASE}} --glfwdir32=${{env.GLFW_BASE}}
+ ./premake5 vs2019 --with-librw --glfwdir32=${{env.GLFW_BASE}}
- name: Build
run: |
msbuild -m build/reLCS.sln /property:Configuration=${{matrix.buildtype}} /property:Platform=${{matrix.platform}}
diff --git a/premake5.lua b/premake5.lua
index afee03a1..77530c59 100644
--- a/premake5.lua
+++ b/premake5.lua
@@ -1,11 +1,4 @@
newoption {
- trigger = "glewdir",
- value = "PATH",
- description = "Directory of GLEW",
- default = "vendor/glew-2.1.0"
-}
-
-newoption {
trigger = "glfwdir64",
value = "PATH",
description = "Directory of glfw",
@@ -165,7 +158,6 @@ workspace "reLCS"
filter "platforms:*librw_gl3_glfw*"
defines { "RW_GL3" }
- includedirs { path.join(_OPTIONS["glewdir"], "include") }
if(not _OPTIONS["with-librw"]) then
libdirs { path.join(Librw, "lib/%{getsys(cfg.system)}-%{getarch(cfg.architecture)}-gl3/%{cfg.buildcfg}") }
end
@@ -176,9 +168,6 @@ workspace "reLCS"
filter "platforms:*amd64-librw_gl3_glfw*"
includedirs { path.join(_OPTIONS["glfwdir64"], "include") }
- filter "platforms:win*librw_gl3_glfw*"
- defines { "GLEW_STATIC" }
-
filter {}
function setpaths (gamepath, exepath)
@@ -202,7 +191,8 @@ project "librw"
targetname "rw"
targetdir(path.join(Librw, "lib/%{cfg.platform}/%{cfg.buildcfg}"))
files { path.join(Librw, "src/*.*") }
- files { path.join(Librw, "src/*/*.*") }
+ files { path.join(Librw, "src/*/*.*") }
+ files { path.join(Librw, "src/gl/*/*.*") }
filter { "platforms:*x86*" }
architecture "x86"
@@ -406,25 +396,23 @@ project "reLCS"
libdirs { "sdk/dx8sdk/lib" }
filter "platforms:win-x86*gl3_glfw*"
- libdirs { path.join(_OPTIONS["glewdir"], "lib/Release/Win32") }
libdirs { path.join(_OPTIONS["glfwdir32"], "lib-" .. string.gsub(_ACTION or '', "vs", "vc")) }
- links { "opengl32", "glew32s", "glfw3" }
+ links { "opengl32", "glfw3" }
filter "platforms:win-amd64*gl3_glfw*"
- libdirs { path.join(_OPTIONS["glewdir"], "lib/Release/x64") }
libdirs { path.join(_OPTIONS["glfwdir64"], "lib-" .. string.gsub(_ACTION or '', "vs", "vc")) }
- links { "opengl32", "glew32s", "glfw3" }
+ links { "opengl32", "glfw3" }
filter "platforms:linux*gl3_glfw*"
- links { "GL", "GLEW", "glfw" }
+ links { "GL", "glfw" }
filter "platforms:bsd*gl3_glfw*"
- links { "GL", "GLEW", "glfw", "sysinfo" }
+ links { "GL", "glfw", "sysinfo" }
includedirs { "/usr/local/include" }
libdirs { "/usr/local/lib" }
filter "platforms:macosx*gl3_glfw*"
- links { "GLEW", "glfw" }
+ links { "glfw" }
linkoptions { "-framework OpenGL" }
includedirs { "/opt/local/include" }
includedirs { "/usr/local/include" }
diff --git a/src/audio/MusicManager.cpp b/src/audio/MusicManager.cpp
index d10a4d0e..34eae77c 100644
--- a/src/audio/MusicManager.cpp
+++ b/src/audio/MusicManager.cpp
@@ -1265,7 +1265,11 @@ cMusicManager::DisplayRadioStationName()
if (vehicle)
{
- int8 track;
+#if defined RADIO_SCROLL_TO_PREV_STATION || defined FIX_BUGS // Because m_nFrontendTrack can have NO_TRACK
+ int track;
+#else
+ uint8 track;
+#endif
gStreamedSound = vehicle->m_nRadioStation;
if (gStreamedSound >= STREAMED_SOUND_CITY_AMBIENT && gStreamedSound <= STREAMED_SOUND_AMBSIL_AMBIENT)
gStreamedSound = RADIO_OFF;
@@ -1282,11 +1286,7 @@ cMusicManager::DisplayRadioStationName()
gNumRetunePresses++;
}
else
-#ifdef FIX_BUGS
- track = GetCarTuning(); // gStreamedSound or veh->m_nRadioStation would also work, but these don't cover police/taxi radios
-#else
track = m_nFrontendTrack;
-#endif
wchar* string = nil;
switch (track) {
diff --git a/src/audio/oal/stream.cpp b/src/audio/oal/stream.cpp
index e2e87f2d..ed73e940 100644
--- a/src/audio/oal/stream.cpp
+++ b/src/audio/oal/stream.cpp
@@ -464,7 +464,7 @@ public:
#endif
#ifdef AUDIO_OAL_USE_MPG123
-// fuzzy seek eliminates stutter when playing ADF but spams errors a lot (nothing breaks though)
+// fuzzy seek eliminates stutter when playing ADF but spams errors a lot (and breaks radio sometimes)
//#define MP3_USE_FUZZY_SEEK
class CMP3File : public IDecoder
@@ -492,6 +492,8 @@ public:
{
#ifdef MP3_USE_FUZZY_SEEK
mpg123_param(m_pMH, MPG123_FLAGS, MPG123_FUZZY | MPG123_SEEKBUFFER | MPG123_GAPLESS | MPG123_QUIET, 0.0);
+#else
+ mpg123_param(m_pMH, MPG123_FLAGS, MPG123_SEEKBUFFER | MPG123_GAPLESS, 0.0);
#endif
long rate = 0;
int channels = 0;
@@ -602,6 +604,8 @@ public:
{
#ifdef MP3_USE_FUZZY_SEEK
mpg123_param(m_pMH, MPG123_FLAGS, MPG123_FUZZY | MPG123_SEEKBUFFER | MPG123_GAPLESS | MPG123_QUIET, 0.0);
+#else
+ mpg123_param(m_pMH, MPG123_FLAGS, MPG123_SEEKBUFFER | MPG123_GAPLESS, 0.0);
#endif
long rate = 0;
int channels = 0;
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index b4551ffc..e6419069 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -1881,8 +1881,13 @@ CMenuManager::DrawControllerBound(int32 yStart, int32 xStart, int32 unused, int8
}
// Print bindings, including seperator (-) between them
+
CFont::SetScale(MENU_X(0.25f), MENU_Y(LISTITEM_Y_SCALE));
+#ifdef FIX_BUGS
+ for (; contSetOrder < MAX_SETORDERS && controllerAction >= 0; contSetOrder++) {
+#else
for (; contSetOrder < MAX_SETORDERS && controllerAction != -1; contSetOrder++) {
+#endif
wchar *settingText = ControlsManager.GetControllerSettingTextWithOrderNumber((e_ControllerAction)controllerAction, (eContSetOrder)contSetOrder);
if (settingText) {
++bindingsForThisOpt;
@@ -5503,6 +5508,9 @@ CMenuManager::SwitchMenuOnAndOff()
}
Initialise();
LoadAllTextures();
+#ifdef FIX_BUGS
+ CPad::StopPadsShaking();
+#endif
} else {
#ifdef EXTENDED_COLOURFILTER
// we always expect CPostFX to be open