[Scummvm-git-logs] scummvm branch-2-6 -> 69ad49728dc2a2178dd629dd2303ae9df1dfb8aa
ccawley2011
noreply at scummvm.org
Sat Jun 18 23:39:12 UTC 2022
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d586250d83 OPENGL3D: Make use of the active rect provided by WindowedGraphicsManager
30f2402728 DOCS: Update the RISC OS documentation
7babe5a3b9 RISCOS: Implement OSystem::messageBox()
7a2164cbe0 RISCOS: Add log10f and strcoll to functions to link
69ad49728d RISCOS: Improve flags when building with plugins
Commit: d586250d834dabd4383854247a1d116852c98d28
https://github.com/scummvm/scummvm/commit/d586250d834dabd4383854247a1d116852c98d28
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-06-19T00:37:46+01:00
Commit Message:
OPENGL3D: Make use of the active rect provided by WindowedGraphicsManager
Changed paths:
backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
backends/graphics3d/openglsdl/openglsdl-graphics3d.h
engines/engine.cpp
po/POTFILES
diff --git a/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp b/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
index adc5632d416..0ab78342813 100644
--- a/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
+++ b/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
@@ -32,6 +32,7 @@
#include "common/config-manager.h"
#include "common/file.h"
+#include "common/translation.h"
#include "engines/engine.h"
@@ -51,12 +52,10 @@ OpenGLSdlGraphics3dManager::OpenGLSdlGraphics3dManager(SdlEventSource *eventSour
_glContext(nullptr),
#endif
_supportsFrameBuffer(supportsFrameBuffer),
- _overlayVisible(false),
_overlayScreen(nullptr),
_overlayBackground(nullptr),
- _gameRect(),
_fullscreen(false),
- _lockAspectRatio(true),
+ _stretchMode(STRETCH_FIT),
_frameBuffer(nullptr),
_surfaceRenderer(nullptr),
_engineRequestedWidth(0),
@@ -157,7 +156,7 @@ bool OpenGLSdlGraphics3dManager::hasFeature(OSystem::Feature f) const {
(f == OSystem::kFeatureFullscreenToggleKeepsContext) ||
#endif
(f == OSystem::kFeatureVSync) ||
- (f == OSystem::kFeatureAspectRatioCorrection) ||
+ (f == OSystem::kFeatureStretchMode) ||
(f == OSystem::kFeatureOverlaySupportsAlpha && _overlayFormat.aBits() > 3);
}
@@ -167,8 +166,6 @@ bool OpenGLSdlGraphics3dManager::getFeatureState(OSystem::Feature f) const {
return isVSyncEnabled();
case OSystem::kFeatureFullscreenMode:
return _fullscreen;
- case OSystem::kFeatureAspectRatioCorrection:
- return _lockAspectRatio;
default:
return false;
}
@@ -183,9 +180,6 @@ void OpenGLSdlGraphics3dManager::setFeatureState(OSystem::Feature f, bool enable
createOrUpdateScreen();
}
break;
- case OSystem::kFeatureAspectRatioCorrection:
- _lockAspectRatio = enable;
- break;
default:
break;
}
@@ -230,6 +224,53 @@ int OpenGLSdlGraphics3dManager::getGraphicsMode() const {
return 0;
}
+const OSystem::GraphicsMode glStretchModes[] = {
+ {"center", _s("Center"), STRETCH_CENTER},
+ {"pixel-perfect", _s("Pixel-perfect scaling"), STRETCH_INTEGRAL},
+ {"even-pixels", _s("Even pixels scaling"), STRETCH_INTEGRAL_AR},
+ {"fit", _s("Fit to window"), STRETCH_FIT},
+ {"stretch", _s("Stretch to window"), STRETCH_STRETCH},
+ {"fit_force_aspect", _s("Fit to window (4:3)"), STRETCH_FIT_FORCE_ASPECT},
+ {nullptr, nullptr, 0}
+};
+
+const OSystem::GraphicsMode *OpenGLSdlGraphics3dManager::getSupportedStretchModes() const {
+ return glStretchModes;
+}
+
+int OpenGLSdlGraphics3dManager::getDefaultStretchMode() const {
+ return STRETCH_FIT;
+}
+
+bool OpenGLSdlGraphics3dManager::setStretchMode(int mode) {
+ assert(_transactionMode != kTransactionNone);
+
+ if (mode == _stretchMode)
+ return true;
+
+ // Check this is a valid mode
+ const OSystem::GraphicsMode *sm = getSupportedStretchModes();
+ bool found = false;
+ while (sm->name) {
+ if (sm->id == mode) {
+ found = true;
+ break;
+ }
+ sm++;
+ }
+ if (!found) {
+ warning("unknown stretch mode %d", mode);
+ return false;
+ }
+
+ _stretchMode = mode;
+ return true;
+}
+
+int OpenGLSdlGraphics3dManager::getStretchMode() const {
+ return _stretchMode;
+}
+
void OpenGLSdlGraphics3dManager::initSize(uint w, uint h, const Graphics::PixelFormat *format) {
_engineRequestedWidth = w;
_engineRequestedHeight = h;
@@ -243,7 +284,6 @@ void OpenGLSdlGraphics3dManager::setupScreen() {
closeOverlay();
_antialiasing = ConfMan.getInt("antialiasing");
- _lockAspectRatio = ConfMan.getBool("aspect_ratio");
_vsync = ConfMan.getBool("vsync");
#if SDL_VERSION_ATLEAST(2, 0, 0)
@@ -343,45 +383,17 @@ void OpenGLSdlGraphics3dManager::createOrUpdateScreen() {
int obtainedHeight = effectiveHeight;
#endif
- handleResize(obtainedWidth, obtainedHeight);
-
- // Compute the rectangle where to draw the game inside the effective screen
- _gameRect = computeGameRect(renderToFrameBuffer, _engineRequestedWidth, _engineRequestedHeight,
- obtainedWidth, obtainedHeight);
-
initializeOpenGLContext();
_surfaceRenderer = OpenGL::createBestSurfaceRenderer();
-
_overlayFormat = OpenGL::TextureGL::getRGBAPixelFormat();
- _overlayScreen = new OpenGL::TiledSurface(obtainedWidth, obtainedHeight, _overlayFormat);
-
- _screenChangeCount++;
if (renderToFrameBuffer) {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
_frameBuffer = createFramebuffer(_engineRequestedWidth, _engineRequestedHeight);
_frameBuffer->attach();
- }
-}
-
-Math::Rect2d OpenGLSdlGraphics3dManager::computeGameRect(bool renderToFrameBuffer, uint gameWidth, uint gameHeight,
- uint screenWidth, uint screenHeight) {
- if (renderToFrameBuffer) {
- if (_lockAspectRatio) {
- // The game is scaled to fit the screen, keeping the same aspect ratio
- float scale = MIN(screenHeight / float(gameHeight), screenWidth / float(gameWidth));
- float scaledW = scale * (gameWidth / float(screenWidth));
- float scaledH = scale * (gameHeight / float(screenHeight));
- return Math::Rect2d(
- Math::Vector2d(0.5 - (0.5 * scaledW), 0.5 - (0.5 * scaledH)),
- Math::Vector2d(0.5 + (0.5 * scaledW), 0.5 + (0.5 * scaledH))
- );
- } else {
- // The game occupies the whole screen
- return Math::Rect2d(Math::Vector2d(0, 0), Math::Vector2d(1, 1));
- }
+ handleResize(_engineRequestedWidth, _engineRequestedHeight);
} else {
- return Math::Rect2d(Math::Vector2d(0, 0), Math::Vector2d(1, 1));
+ handleResize(obtainedWidth, obtainedHeight);
}
}
@@ -396,21 +408,26 @@ void OpenGLSdlGraphics3dManager::notifyResize(const int width, const int height)
return; // nothing to do
}
- // Compute the rectangle where to draw the game inside the effective screen
- _gameRect = computeGameRect(_frameBuffer != nullptr,
- _engineRequestedWidth, _engineRequestedHeight,
- newWidth, newHeight);
+ handleResize(newWidth, newHeight);
+#else
+ handleResize(width, height);
+#endif
+}
+void OpenGLSdlGraphics3dManager::handleResizeImpl(const int width, const int height) {
// Update the overlay
delete _overlayScreen;
- _overlayScreen = new OpenGL::TiledSurface(newWidth, newHeight, _overlayFormat);
+ _overlayScreen = new OpenGL::TiledSurface(width, height, _overlayFormat);
// Clear the overlay background so it is not displayed distorted while resizing
delete _overlayBackground;
_overlayBackground = nullptr;
+ // Re-setup the scaling for the screen
+ recalculateDisplayAreas();
+
+ // Something changed, so update the screen change ID.
_screenChangeCount++;
-#endif
}
void OpenGLSdlGraphics3dManager::initializeOpenGLContext() const {
@@ -564,7 +581,7 @@ bool OpenGLSdlGraphics3dManager::isVSyncEnabled() const {
void OpenGLSdlGraphics3dManager::drawOverlay() {
_surfaceRenderer->prepareState();
- glViewport(0, 0, _overlayScreen->getWidth(), _overlayScreen->getHeight());
+ glViewport(_overlayDrawRect.left, _windowHeight - _overlayDrawRect.top - _overlayDrawRect.height(), _overlayDrawRect.width(), _overlayDrawRect.height());
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
if (_overlayBackground) {
@@ -593,9 +610,9 @@ void OpenGLSdlGraphics3dManager::updateScreen() {
if (_frameBuffer) {
_frameBuffer->detach();
_surfaceRenderer->prepareState();
- glViewport(0, 0, _overlayScreen->getWidth(), _overlayScreen->getHeight());
+ glViewport(_gameDrawRect.left, _windowHeight - _gameDrawRect.top - _gameDrawRect.height(), _gameDrawRect.width(), _gameDrawRect.height());
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
- _surfaceRenderer->render(_frameBuffer, _gameRect);
+ _surfaceRenderer->render(_frameBuffer, Math::Rect2d(Math::Vector2d(0, 0), Math::Vector2d(1, 1)));
_surfaceRenderer->restorePreviousState();
}
@@ -642,7 +659,7 @@ void OpenGLSdlGraphics3dManager::showOverlay() {
if (_overlayVisible) {
return;
}
- _overlayVisible = true;
+ WindowedGraphicsManager::showOverlay();
delete _overlayBackground;
_overlayBackground = nullptr;
@@ -663,7 +680,7 @@ void OpenGLSdlGraphics3dManager::hideOverlay() {
if (!_overlayVisible) {
return;
}
- _overlayVisible = false;
+ WindowedGraphicsManager::hideOverlay();
delete _overlayBackground;
_overlayBackground = nullptr;
@@ -713,37 +730,21 @@ int16 OpenGLSdlGraphics3dManager::getOverlayWidth() const {
}
bool OpenGLSdlGraphics3dManager::showMouse(bool visible) {
- SDL_ShowCursor(visible);
+ SDL_ShowCursor(visible ? SDL_ENABLE : SDL_DISABLE);
return true;
}
-void OpenGLSdlGraphics3dManager::warpMouse(int x, int y) {
- if (!_overlayVisible && _frameBuffer) {
- // Scale from game coordinates to screen coordinates
- x = (x * _gameRect.getWidth() * _overlayScreen->getWidth()) / _frameBuffer->getWidth();
- y = (y * _gameRect.getHeight() * _overlayScreen->getHeight()) / _frameBuffer->getHeight();
-
- x += _gameRect.getTopLeft().getX() * _overlayScreen->getWidth();
- y += _gameRect.getTopLeft().getY() * _overlayScreen->getHeight();
- }
-
- _window->warpMouseInWindow(x, y);
-}
-
-void OpenGLSdlGraphics3dManager::transformMouseCoordinates(Common::Point &point) {
- if (_overlayVisible || !_frameBuffer)
- return;
+bool OpenGLSdlGraphics3dManager::notifyMousePosition(Common::Point &mouse) {
+ // HACK: SdlGraphicsManager disables the system cursor when the mouse is in the
+ // active draw rect, however the 3D graphics manager uses it instead of the
+ // standard mouse graphic.
+ int showCursor = SDL_ShowCursor(SDL_QUERY);
- // Scale from screen coordinates to game coordinates
- point.x -= _gameRect.getTopLeft().getX() * _overlayScreen->getWidth();
- point.y -= _gameRect.getTopLeft().getY() * _overlayScreen->getHeight();
+ bool valid = SdlGraphicsManager::notifyMousePosition(mouse);
- point.x = (point.x * _frameBuffer->getWidth()) / (_gameRect.getWidth() * _overlayScreen->getWidth());
- point.y = (point.y * _frameBuffer->getHeight()) / (_gameRect.getHeight() * _overlayScreen->getHeight());
+ SDL_ShowCursor(showCursor);
- // Make sure we only supply valid coordinates.
- point.x = CLIP<int16>(point.x, 0, _frameBuffer->getWidth() - 1);
- point.y = CLIP<int16>(point.y, 0, _frameBuffer->getHeight() - 1);
+ return valid;
}
#if SDL_VERSION_ATLEAST(2, 0, 0)
diff --git a/backends/graphics3d/openglsdl/openglsdl-graphics3d.h b/backends/graphics3d/openglsdl/openglsdl-graphics3d.h
index 35a7a79204d..7b0ea2dc6b1 100644
--- a/backends/graphics3d/openglsdl/openglsdl-graphics3d.h
+++ b/backends/graphics3d/openglsdl/openglsdl-graphics3d.h
@@ -57,6 +57,11 @@ public:
bool setGraphicsMode(int mode, uint flags = OSystem::kGfxModeNoFlags) override;
int getGraphicsMode() const override;
+ const OSystem::GraphicsMode *getSupportedStretchModes() const override;
+ int getDefaultStretchMode() const override;
+ bool setStretchMode(int mode) override;
+ int getStretchMode() const override;
+
void beginGFXTransaction() override;
OSystem::TransactionError endGFXTransaction() override;
@@ -95,11 +100,9 @@ public:
void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) override;
int16 getOverlayWidth() const override;
int16 getOverlayHeight() const override;
- bool isOverlayVisible() const override { return _overlayVisible; }
// GraphicsManager API - Mouse
bool showMouse(bool visible) override;
- void warpMouse(int x, int y) override;
void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL) override {}
void setCursorPalette(const byte *colors, uint start, uint num) override {}
@@ -109,12 +112,7 @@ public:
bool gameNeedsAspectRatioCorrection() const override { return false; }
- void transformMouseCoordinates(Common::Point &point);
- bool notifyMousePosition(Common::Point &mouse) override {
- transformMouseCoordinates(mouse);
-
- return true;
- }
+ bool notifyMousePosition(Common::Point &mouse) override;
protected:
#if SDL_VERSION_ATLEAST(2, 0, 0)
@@ -127,8 +125,6 @@ protected:
bool _supportsFrameBuffer;
- Math::Rect2d _gameRect;
-
struct OpenGLPixelFormat {
uint bytesPerPixel;
uint redSize;
@@ -152,9 +148,7 @@ protected:
void createOrUpdateScreen();
void setupScreen();
- /** Compute the size and position of the game rectangle in the screen */
- Math::Rect2d computeGameRect(bool renderToFrameBuffer, uint gameWidth, uint gameHeight,
- uint screenWidth, uint screenHeight);
+ void handleResizeImpl(const int width, const int height) override;
bool saveScreenshot(const Common::String &filename) const override;
@@ -162,10 +156,9 @@ protected:
int _screenChangeCount;
int _antialiasing;
+ int _stretchMode;
bool _vsync;
bool _fullscreen;
- bool _lockAspectRatio;
- bool _overlayVisible;
OpenGL::TiledSurface *_overlayScreen;
OpenGL::TiledSurface *_overlayBackground;
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 41d00be5574..a76b8e7e3e0 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -424,6 +424,7 @@ void initGraphics3d(int width, int height) {
g_system->initSize(width, height);
g_system->setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen")); // TODO: Replace this with initCommonGFX()
g_system->setFeatureState(OSystem::kFeatureAspectRatioCorrection, ConfMan.getBool("aspect_ratio")); // TODO: Replace this with initCommonGFX()
+ g_system->setStretchMode(ConfMan.get("stretch_mode").c_str()); // TODO: Replace this with initCommonGFX()
g_system->endGFXTransaction();
}
diff --git a/po/POTFILES b/po/POTFILES
index 29fde2ca97a..e5b21859411 100644
--- a/po/POTFILES
+++ b/po/POTFILES
@@ -73,6 +73,7 @@ backends/graphics/opengl/opengl-graphics.cpp
backends/graphics/openglsdl/openglsdl-graphics.cpp
backends/graphics/surfacesdl/surfacesdl-graphics.cpp
backends/graphics/sdl/sdl-graphics.cpp
+backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
backends/keymapper/hardware-input.cpp
backends/keymapper/remap-widget.cpp
backends/keymapper/virtual-mouse.cpp
Commit: 30f2402728ef559646165115e80f829acad28a54
https://github.com/scummvm/scummvm/commit/30f2402728ef559646165115e80f829acad28a54
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-06-19T00:38:08+01:00
Commit Message:
DOCS: Update the RISC OS documentation
Changed paths:
doc/docportal/other_platforms/risc_os.rst
diff --git a/doc/docportal/other_platforms/risc_os.rst b/doc/docportal/other_platforms/risc_os.rst
index d0e32c3eb34..a4af51d27f2 100644
--- a/doc/docportal/other_platforms/risc_os.rst
+++ b/doc/docportal/other_platforms/risc_os.rst
@@ -2,13 +2,14 @@
RISC OS
=============================
-This page contains all the information you need to get ScummVM up and running on the RISC operating system.
+This page contains all the information you need to get ScummVM up and running on the RISC OS operating system.
What you'll need
===================
-- A system running RISC OS 5
-- The `SharedUnixLibrary <https://www.riscos.info/index.php/SharedUnixLibrary>`_, `DRenderer <https://www.riscos.info/packages/LibraryDetails.html#DRendererarm>`_ and `Iconv <https://www.netsurf-browser.org/projects/iconv/>`_ modules installed. SharedUnixLibrary and DRenderer can be installed using `Packman <https://www.riscos.info/index.php/PackMan>`_.
+- A system running RISC OS 5.
+- A minimum of 64 MB RAM. 32 MB may work in some circumstances, but is not generally recommended.
+- The `SharedUnixLibrary <https://www.riscos.info/index.php/SharedUnixLibrary>`_ and `DRenderer <https://www.riscos.info/packages/LibraryDetails.html#DRendererarm>`_ modules installed. These can be installed using `PackMan <https://www.riscos.info/index.php/PackMan>`_.
Installing ScummVM
======================================
@@ -55,7 +56,7 @@ For more information about settings, see the Settings section of the documentati
.. _reporter:
-There is one additional configuration option, *enable_reporter*. When set to true in :doc:`../advanced_topics/configuration_file`, log messages are sent to the `!Reporter <http://www.avisoft.force9.co.uk/Reporter.html>`_ application. This is useful mostly for developers.
+There is one additional configuration option, *enable_reporter*. When set to true in :doc:`../advanced_topics/configuration_file`, log messages are sent to the `!Reporter <http://www.avisoft.force9.co.uk/Reporter.htm>`_ application. This is useful mostly for developers.
Known issues
Commit: 7babe5a3b911f6bac011d66a06be7f89764aace5
https://github.com/scummvm/scummvm/commit/7babe5a3b911f6bac011d66a06be7f89764aace5
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-06-19T00:38:23+01:00
Commit Message:
RISCOS: Implement OSystem::messageBox()
Changed paths:
backends/platform/sdl/riscos/riscos.cpp
backends/platform/sdl/riscos/riscos.h
diff --git a/backends/platform/sdl/riscos/riscos.cpp b/backends/platform/sdl/riscos/riscos.cpp
index 5a255676698..f75fd75ed47 100644
--- a/backends/platform/sdl/riscos/riscos.cpp
+++ b/backends/platform/sdl/riscos/riscos.cpp
@@ -116,6 +116,36 @@ void OSystem_RISCOS::logMessage(LogMessageType::Type type, const char *message)
_swix(Report_Text0, _IN(0), report.c_str());
}
+void OSystem_RISCOS::messageBox(LogMessageType::Type type, const char *message) {
+ _kernel_swi_regs regs;
+ _kernel_oserror error;
+
+ error.errnum = 0;
+ Common::strlcpy(error.errmess, message, 252);
+ regs.r[0] = (int)&error;
+ regs.r[1] = 0;
+ regs.r[2] = (int)"ScummVM";
+ regs.r[3] = 0;
+ regs.r[4] = 0;
+ regs.r[5] = 0;
+
+ switch (type) {
+ case LogMessageType::kError:
+ regs.r[1] |= (1 << 8);
+ break;
+ case LogMessageType::kWarning:
+ regs.r[1] |= (1 << 8) | (2 << 9);
+ break;
+ case LogMessageType::kInfo:
+ case LogMessageType::kDebug:
+ default:
+ regs.r[1] |= (1 << 8) | (1 << 9);
+ break;
+ }
+
+ _kernel_swi(Wimp_ReportError, ®s, ®s);
+}
+
Common::String OSystem_RISCOS::getDefaultConfigFileName() {
return "/<Choices$Write>/ScummVM/scummvmrc";
}
diff --git a/backends/platform/sdl/riscos/riscos.h b/backends/platform/sdl/riscos/riscos.h
index bc509cc4910..9dade0867c1 100644
--- a/backends/platform/sdl/riscos/riscos.h
+++ b/backends/platform/sdl/riscos/riscos.h
@@ -34,6 +34,7 @@ public:
virtual bool openUrl(const Common::String &url);
virtual void logMessage(LogMessageType::Type type, const char *message);
+ virtual void messageBox(LogMessageType::Type type, const char *message);
protected:
virtual Common::String getDefaultConfigFileName();
Commit: 7a2164cbe0522caa6ada39ebecb1b38c1190de4a
https://github.com/scummvm/scummvm/commit/7a2164cbe0522caa6ada39ebecb1b38c1190de4a
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-06-19T00:38:48+01:00
Commit Message:
RISCOS: Add log10f and strcoll to functions to link
Changed paths:
backends/plugins/riscos/riscos-provider.cpp
diff --git a/backends/plugins/riscos/riscos-provider.cpp b/backends/plugins/riscos/riscos-provider.cpp
index 6399c030c29..52446199805 100644
--- a/backends/plugins/riscos/riscos-provider.cpp
+++ b/backends/plugins/riscos/riscos-provider.cpp
@@ -37,11 +37,13 @@
void pluginHack() {
volatile float f = 0.0f;
volatile double d = 0.0;
+ volatile int i = 0;
byte *b = new (std::nothrow) byte[100];
f = tanhf(f);
f = logf(f);
+ f = log10f(f);
f = lroundf(f);
f = expf(f);
f = frexpf(f, NULL);
@@ -52,6 +54,8 @@ void pluginHack() {
d = nearbyint(d);
+ i = strcoll("dummyA", "dummyB");
+
rename("dummyA", "dummyB");
delete[] b;
Commit: 69ad49728dc2a2178dd629dd2303ae9df1dfb8aa
https://github.com/scummvm/scummvm/commit/69ad49728dc2a2178dd629dd2303ae9df1dfb8aa
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-06-19T00:39:00+01:00
Commit Message:
RISCOS: Improve flags when building with plugins
Changed paths:
configure
diff --git a/configure b/configure
index 1e80a70d408..42ec4ec1561 100755
--- a/configure
+++ b/configure
@@ -3110,6 +3110,12 @@ EOF
_sdlconfig=sdl-config
# RiscOS has no OpenGL support at all even though it's SDL based
_opengl_mode=none
+ if test "$_dynamic_modules" = yes ; then
+ _detection_features_static=no
+ _plugins_default=dynamic
+ else
+ _detection_features_full=no
+ fi
;;
solaris*)
append_var DEFINES "-DSOLARIS"
@@ -4258,6 +4264,7 @@ PLUGIN_LDFLAGS += -Wl,-T$(srcdir)/backends/plugins/psp/plugin.ld -Wl,-zmax-page
append_var DEFINES "-DELF_LOADER_CXA_ATEXIT"
append_var CXXFLAGS "-fuse-cxa-atexit"
append_var DEFINES "-DUNCACHED_PLUGINS"
+ append_var DEFINES "-DELF_NO_MEM_MANAGER"
_mak_plugins='
PLUGIN_EXTRA_DEPS += backends/plugins/riscos/plugin.o
PLUGIN_LDFLAGS += -static -Wl,-T$(srcdir)/backends/plugins/riscos/plugin.ld backends/plugins/riscos/plugin.o -Wl,--wrap=__rt_stkovf_split_small -Wl,--wrap=__rt_stkovf_split_big
@@ -6259,10 +6266,10 @@ case $_host_os in
if test "$_debug_build" = no; then
append_var CXXFLAGS "-mno-poke-function-name"
fi
- append_var CXXFLAGS "-ffunction-sections"
- append_var CXXFLAGS "-fdata-sections"
if test "$_dynamic_modules" = no ; then
append_var LDFLAGS "-Wl,--gc-sections"
+ append_var CXXFLAGS "-ffunction-sections"
+ append_var CXXFLAGS "-fdata-sections"
else
# toolchain asks for gc-sections
append_var LDFLAGS "-Wl,--no-gc-sections"
More information about the Scummvm-git-logs
mailing list