(we don't have "shake views" - these changes of mine come from a long-abandoned experimental branch which allowed limiting the screen shaking to a certain area)
This is the original behaviour of DOS games (where the screen shakes are done by writing certain offsets into the crt cotnrol register of the vga adapter).
Usually it doesn't matter much, since the shake is an effect that passes quickly. But the difference can be noticed in cases like DOTT when switching on the stereo in green tentacle's room. The shaking will continue until the stereo is turned off again. In that case it is really more appealing if the mouse cursor "sticks" to the background.
Set _WIN32_IE to 0x500 everywhere and remove where it's not needed.
As we gracefully check if the function is present or not, it's OK to set
this define without having IE 5.0 installed on target
Adds support for a self-contained portable mode in which the
executable's directory is used for application files instead
of directories in the user's profile.
Portable mode is activated by placing a scummvm.ini file in
the executable's directory. The directory must be outside of
the system's Program Files directory to comply with UAC.
Mostly done using the following Ruby script:
(Dir.glob('**/*.cpp') + Dir.glob('**/*.h')).each do |file|
s = File.read(file, encoding: 'iso8859-1')
t = s.gsub(/(([\w_.\[\]]+)\s*=\s*new\s+\S+?\[[^\]]+?\](?!\())([^\{\}]*?)\n\s+memset\(\s*\2\s*,\s*0\s*,[^;]*;/m, '\1()\3')
if t != s
File.open(file, 'w') { |io| io.write(t) }
end
end
OD Beta is a mips linux OS based on buildroot, that runs on ingenic gaming handhelds
like the gcw0, rg350 and many more.
There was a previous GCW0 port, that was running on legacy opendingux, but that
OS is not maintained since 2014 and has an outdated kernel and toolchain.
Od Beta on the other hand, runs with linux 5.15, has a GCC 10 toolchain and
an active developpment community.
This adds support for 3 flavors :
gcw0 that runs on all jz4770 cpus
lepus that runs on all jz4760 cpus
rg99 which is a jz4725 device
Signed-off-by: Christophe Branchereau <cbranchereau@gmail.com>
Instead of doing linear strcmp-like operation after every byte read, Reader now computes a "hash" of the needle it searches for and updates "hash" of the window contents. Now, it only does strcmp if window has the same "hash" as the needle, which also improves file upload speed for ScummVM's local webserver.
Instead of shifting bytes in the array every time we read 1 byte, Reader now has two "pointers": where it reads from and writes into. This makes the buffer "circular", and removes the unnecessary bytes shifting, which results in increased file upload speed (only for the LAN server; libcurl side stays intact).
When entering fullscreen it was storing the default window size
in the config, which was overwriting the current window size. As
a result when exiting window size, instead of restoring to the
previous window size it was restoring to the default window size.
When loadVideoMode gets called to exit fullscreen, the window is
still fullscreen, which means that the SDL_WINDOW_MAXIMIZED is set
(at least on macOS). As a result the window was resized to the
stored maximized window size instead of the size it had before
entering fullscreen.
The OpenGLSDLGraphicsManager was changed in bb15133a0a to use
SDL_WINDOW_FULLSCREEN_DESKTOP instead of SDL_WINDOW_FULLSCREEN.
But getFeatureState(kFeatureFullscreenMode) was still checking
the SDL_WINDOW_FULLSCREEN flag. This worked because in current
SDL2 versions SDL_WINDOW_FULLSCREEN_DESKTOP is defined as
SDL_WINDOW_FULLSCREEN | 0x00001000, but this is not documented
and could change in future SDL versions.
The previous SdlGraphics3dManager::toggleFullScreen() was not using
beginGFXTransaction / endGFXTransaction in toggleFullScreen().
Restore this logic for 3D games, as using transactions in such games
results in a black screen for 3D games when switching to full screen
A regression from d33487f64
Screen update boundaries are now used as sync points.
Screenshots are now processed on a screen update boundary.
This change increments the version of the Event Recorder
file format to 2; version 1 files will still play back as
before, without synchronising to screen updates.
Instead of falling back to the normal scaler if the new scale factor is
1, explicitly check if the desired scaler is available at the new scale
factor. Suggested by criezy, and I'm shamelessly copying his
implementation because this sort of C++ trickery is something I'm not
fluent in.
At the moment, this shouldn't make any difference. But I guess in the
future, there may be a scaler that's available at 3x and 4x, but not 2x,
or something like that.
Now that we have higher scale factors than 3, it makes sense to try and
figure out a default scaler for high-resolution games that approximate
the window size of a low resolution game.
That also means that we are not necessarily restricted to the normal
scaler, since AdvMame has both 2x and 4x versions.
The User Manual Help menu item now opens the pdf bundled with the
application if present, and only opens the website otherwise.
The bundled documentation is preferred as:
- This will work even with no internet access
- This is future proof and will still work in 10 years when the
website URL might have changed or the website may be down.
- This ensure we get the doc that corresponds to the version of
ScummVM being used.
It looks like other platforms are not affected by this, at least I
wasn't able to reproduce the issue on Linux in any way.
Since branching off to the next release is very soon and we are running
out of time, I'm limiting this to Win32 in order to avoid unneccessary
breakage by only fixing _really_ affected platforms.
Fixes GUI events leaking into engines at startup. This caused
Phantasmagoria 1 to skip its introduction if the game was started from
the ScummVM GUI with a keyboard (Enter) but not with a mouse because
the key-down event started the engine and the key-up event remained
in the queue.
This also purges and mouse events since we happen to already have a
purgeMouseEvents() method. We may want to also clear joystick inputs,
or possibly the entire event queue, but that can be done after the
upcoming release. For now, the known bug is fixed.
The SDL library handles HiDPI differently depending on the system.
On some systems, such as macOS, the drawable area and the SDL window
have a different size (the window is on low-dpi size) while on
other systems such as Windows they have the same size. Because of
that we sometimes need to scale sizes or coordinates between the
two, and sometimes we don't.
This was handled in two different ways. This commit change the code
to handle it consistently everywhere, and also should be more future
proof should SDL change the way it handles HiDPI in the future (as
we now query the size from SDL itself to find out if the scaling is
needed).
This is an initial version of the emscripten build/dist target.
Many things are still missing, see dists/emscripten/README.md for
a detailed summary of what this provides and still misses
SDL handles HiDPI scaling differently depending on the system. On
macOS for example the SDL window size and SDL drawable area have a
different size (factor 2 usually) while on Windows they are the
same. When HiDPI is disabled (for the SDL Surface mode for example)
they are always the same.
We need to appl this scaling when converting cursor position between
the drawable area and the SDL window.
The OSystem_SDL::getDefaultGraphicsMode was returning the
default for the current graphics manager and not the default
for the OSystem_SDL instance. So for example if the default
is SDL Surface when starting ScummVM with the gfx_mode not
set in the config file, and then the user selects the OpenGL
graphics mode, getDefaultGraphicsMode() would now return the
OpenGL mode (the default the OpenGLGraphicsManager). As a
result changing the graphics mode back to <default> and
applying the change would not switch back to Surface SDL
until you restart ScummVM or start a game.
This commit also change how the SDL backends can specify which
graphics mode to use by default. They no longer have to assume
they know the names of the graphics modes in the graphics manager.
The previous implementation was already broken, since the values were never stored in the config file
since that part was already guarded by SDL_VERSION_ATLEAST.
Since we have no way to properly determine if a window is maximized or not for
SDL1, I recommend skipping this part in the compilation.
Now, the function at least works properly for SDL2 - it was broken on _both_ versions before.