This might also become a return to launcher, but I've somehere read the hint that
the event recorder was only meant to play back one game per session. We'll see.
the custom engine events were missing and the default event manager transforms the backend events
. Which means that the event recorder is not persisting the low level key press/release events
but the already transformed custom engine events of the keymapper
This is not the best solution as it removes the warning when this
code is used by devtools such as create_titanic, but getting this to
link would need inclusion of textconsole.o via shim and then still
breaks on g_system, so fastest solution to restore build.
While it's not needed to build ScummVM, apparently some of the other
tools that use String do not include textconsole.h and complain that
warning() is undefined.
Some engines do this, and it's not really known what should happen. We
need to decide on a behavior, and stick to that. This warning is to help
find where it happens.
From my own tests, it can happen in at least ADL, Avalanche, Chewy,
Director, Blazing Dragons, MacVenture, MADS, Prince, Stark, Startrek,
and Trecision. Only ADL is known to be broken by the current behavior.
The result of my test can be found at
http://www.update.uu.se/~d91tan/tmp/string.txt
../scummvm/gui/options.cpp: In member function 'virtual void GUI::OptionsDialog::apply()':
../scummvm/gui/options.cpp:647:82: warning: comparison of integer expressions of different signedness: 'uint' {aka 'unsigned int'} and 'int' [-Wsign-compare]
647 | else if (scalerPlugins[defaultScaler]->get<ScalerPluginObject>().getFactor() != g_system->getDefaultScaleFactor())
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
==3124361== Invalid write of size 8
==3124361== at 0x483F803: memmove (vg_replace_strmem.c:1270)
==3124361== by 0x4DBF61: SurfaceSdlGraphicsManager::grabOverlay(void*, int) const (surfacesdl-graphics.cpp:1753)
==3124361== by 0x482051: ModularGraphicsBackend::grabOverlay(void*, int) (modular-backend.cpp:215)
==3124361== by 0x434EE1: GUI::ThemeEngine::clearAll() (ThemeEngine.cpp:376)
==3124361== by 0x40128E: GUI::EventRecorder::preDrawOverlayGui() (EventRecorder.cpp:558)
==3124361== by 0x481DB2: ModularGraphicsBackend::updateScreen() (modular-backend.cpp:173)
==3124361== by 0x559967: Graphics::Screen::updateScreen() (screen.cpp:62)
==3124361== by 0x55991C: Graphics::Screen::update() (screen.cpp:56)
==3124361== by 0x38AFC7: TwinE::TwineScreen::update() (twine.cpp:126)
==3124361== by 0x3B8759: TwinE::Screens::adjustPalette(unsigned char, unsigned char, unsigned char, unsigned int const*, int) (screens.cpp:150)
==3124361== by 0x3B8A89: TwinE::Screens::fadeToPal(unsigned int const*) (screens.cpp:207)
==3124361== by 0x3B8403: TwinE::Screens::loadImage(int, int, bool) (screens.cpp:80)
==3124361== Address 0x31453050 is 16 bytes after a block of size 512,000 alloc'd
==3124361== at 0x483AB65: calloc (vg_replace_malloc.c:760)
==3124361== by 0x55B38C: Graphics::Surface::create(unsigned short, unsigned short, Graphics::PixelFormat const&) (surface.cpp:75)
==3124361== by 0x551111: Graphics::ManagedSurface::create(unsigned short, unsigned short, Graphics::PixelFormat const&) (managed_surface.cpp:153)
==3124361== by 0x4352D5: GUI::ThemeEngine::setGraphicsMode(GUI::ThemeEngine::GraphicsMode) (ThemeEngine.cpp:453)
==3124361== by 0x434A52: GUI::ThemeEngine::init() (ThemeEngine.cpp:324)
==3124361== by 0x43501B: GUI::ThemeEngine::refresh() (ThemeEngine.cpp:394)
==3124361== by 0x405780: GUI::GuiManager::screenChange() (gui-manager.cpp:603)
==3124361== by 0x405C6B: GUI::GuiManager::processEvent(Common::Event const&, GUI::Dialog*) (gui-manager.cpp:677)
==3124361== by 0x404EBA: GUI::GuiManager::runLoop() (gui-manager.cpp:429)
==3124361== by 0x3FD847: GUI::Dialog::runModal() (dialog.cpp:77)
==3124361== by 0x36D747: launcherDialog() (main.cpp:106)
==3124361== by 0x36FF92: scummvm_main (main.cpp:552)
It looks like the _videoMode.overlayHeight in SurfaceSdlGraphicsManager::grabOverlay and ThemeEngine::_backBuffer::h are somehow out of sync after
starting the game in a different resolution as the gui was started with. So the overlayHeight is updated - but the backbuffer (Surface) is not resized.
This is with event recorder being active - right after starting the game and switching the resolution.
==1313424== Conditional jump or move depends on uninitialised value(s)
==1313424== at 0x682225: Common::wrapCompressedReadStream(Common::SeekableReadStream*, unsigned int) (zlib.cpp:498)
==1313424== by 0x46CDB9: DefaultSaveFileManager::openForLoading(Common::String const&) (default-saves.cpp:134)
==1313424== by 0x68334D: Common::PlaybackFile::openRead(Common::String const&) (recorderfile.cpp:74)
==1313424== by 0x444558: GUI::RecorderDialog::updateList() (recorderdialog.cpp:206)
==1313424== by 0x4446BD: GUI::RecorderDialog::runModal(Common::String&) (recorderdialog.cpp:218)
==1313424== by 0x3DF0E5: GUI::LauncherDialog::recordGame(int) (launcher.cpp:461)
==1313424== by 0x3E0397: GUI::LauncherDialog::handleCommand(GUI::CommandSender*, unsigned int, unsigned int) (launcher.cpp:671)
==1313424== by 0x400BF8: GUI::CommandSender::sendCommand(unsigned int, unsigned int) (object.h:55)
==1313424== by 0x42DAB8: GUI::DropdownButtonWidget::handleMouseUp(int, int, int, int) (widget.cpp:497)
==1313424== by 0x3D3A37: GUI::Dialog::handleMouseUp(int, int, int, int) (dialog.cpp:228)
==1313424== by 0x3DB72C: GUI::GuiManager::processEvent(Common::Event const&, GUI::Dialog*) (gui-manager.cpp:668)
==1313424== by 0x3DA9EA: GUI::GuiManager::runLoop() (gui-manager.cpp:429)
Happens when you start with the event recorder compiled into scummvm and open the dialog to start
a new record.
This emulates the "slow" render mode of the Smacker lib,
which returns the blocks changed each frame instead of full frames.
Nightlong relies on this to correctly refresh its screen buffer.
Added support for InstallShield v6 cabinets, which can be made up of
multiple files. The interface for creating an Archive instance now takes
the base filename (e.g. the "data" in "data1.cab") for all cabinets,
including single-file ones.
Co-Authored-By: clone2727 <236052+clone2727@users.noreply.github.com>
Co-Authored-By: Walter van Niftrik <615114+waltervn@users.noreply.github.com>
OSystem now just returns a nullptr if there is no text to speech manager instance
(because none is compiled into the binary, or the system doesn't provide support
for it). This removed the need for the engine authors to add scummvm osystem compile
time options checks into their engine code
CJK offsets were wrong compared to encodings.dat file and buffers were
read past their end.
Rewrote indexing to make it match the Python script and optimize
slightly
We have a lot of legacy code that was written with the old behaviour
where it returned the default value in such a case. Until we are
confident all this code has been updated, we continue to use the
old behaviour in release builds to avoid creating instabilities.
This still error our in non-release builds, which will help detect
the code that still needs to be updated.
The string memory pool mutex lock/unlock were lost during the
merge of String and U32String. This caused the cloud feature
to randomly crash for example when synchronizing savegames or
downloading game data.
With __printf__, MinGW prefers the portable old ms-style printf, and
warns if formats like %lld and %hhd are used.
In practice, if __USE_MINGW_ANSI_STDIO is not defined, it defaults to 1
on C++11, and these formats are supported. Using __gnu_printf__
suppresses bad format warnings.
`convertBiDiStringByLines` calls the BiDi algo for each line in isolation,
and returns a joined result.
That's needed to support BiDi in AGI, and might be needed for other engines
in the future.
In order to do that, a new utility function was added:
`String::forEachLine` which gets a function as input, and its arg(s) (if it has any),
and calls the function on each line, and returns a new string which is all
concatenation of all the lines results (with '\n' added between them).
This is emitted when -Wdeprecated-copy is enabled. The fix implemented
is to explicitly declare this to be the default copy operator.
Since this may be a latent bug, this is marked with a FIXME.
bits/os_defines.h has #define NOMINMAX 1, which conflicts with the
non-value #define NOMINXMAX in scummsys.h.
In file included from ../scummvm/common/lua/lua.h:12,
from ../scummvm/common/lua/ltable.cpp:27:
../scummvm/common/scummsys.h:111: warning: "NOMINMAX" redefined
111 | #define NOMINMAX
|
In file included from C:/msys64/mingw64/include/c++/10.2.0/x86_64-w64-
mingw32/bits/c++config.h:518,
from C:/msys64/mingw64/include/c++/10.2.0/cmath:41,
from C:/msys64/mingw64/include/c++/10.2.0/math.h:36,
from ../scummvm/common/lua/ltable.cpp:21:
C:/msys64/mingw64/include/c++/10.2.0/x86_64-w64-mingw32/bits/
os_defines.h:45: note: this is the location of the previous definition
45 | #define NOMINMAX 1
|
Amends commit 88f685217b.
This config was handled in the DefaultEventManager, but this did not
work for engines that quit the game without using a QUIT_EVENT (such
as SCI). So now it is handled one level up directly in scummvm_main.
Note: It is still also handled in the DefaultEventManager so that we
get the correct confirmation dialog there when "confirm_exit" is true.