Skip to content

Commit

Permalink
Septerra Core release version 1.04.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
M-HT committed May 17, 2023
1 parent d858ddd commit 68c004f
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 15 deletions.
29 changes: 17 additions & 12 deletions games/Septerra Core/SR-Septerra/WinApi-user32.c
Original file line number Diff line number Diff line change
Expand Up @@ -537,20 +537,25 @@ static int find_event(SDL_Event *event, int remove, int wait)
window = SDL_GetWindowFromID(event->motion.windowID);
renderer = SDL_GetRenderer(window);
#if SDL_VERSION_ATLEAST(2,0,18)
SDL_RenderLogicalToWindow(renderer, newx, newy, &newx, &newy);
#else
float scaleX, scaleY;
SDL_Rect viewport;
int output_w, output_h, window_w, window_h;
if (sdl_versionnum >= SDL_VERSIONNUM(2,0,18))
{
SDL_RenderLogicalToWindow(renderer, newx, newy, &newx, &newy);
}
else
#endif
{
float scaleX, scaleY;
SDL_Rect viewport;
int output_w, output_h, window_w, window_h;

SDL_RenderGetScale(renderer, &scaleX, &scaleY);
SDL_RenderGetViewport(renderer, &viewport);
SDL_GetRendererOutputSize(renderer, &output_w, &output_h);
SDL_GetWindowSize(window, &window_w, &window_h);
SDL_RenderGetScale(renderer, &scaleX, &scaleY);
SDL_RenderGetViewport(renderer, &viewport);
SDL_GetRendererOutputSize(renderer, &output_w, &output_h);
SDL_GetWindowSize(window, &window_w, &window_h);

newx = (int) (((newx + viewport.x) * scaleX * window_w) / output_w);
newy = (int) (((newy + viewport.y) * scaleY * window_h) / output_h);
#endif
newx = (int) (((newx + viewport.x) * scaleX * window_w) / output_w);
newy = (int) (((newy + viewport.y) * scaleY * window_h) / output_h);
}
SDL_WarpMouseInWindow(window, newx, newy);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Septerra Core for Linux (armv7-gnueabihf)
Version 1.04.0.8
Version 1.04.0.9

Original Septerra Core version 1.04 is required for playing.
(version from GOG.com can be used for playing)
Expand Down Expand Up @@ -30,6 +30,9 @@ Setting CPU_SleepMode (in configuration file) to "reduced" can help. If not, the

Changes
-------
v1.04.0.9 (2023-05-17)
* fix moving mouse cursor outside the game area in fullscreen

v1.04.0.8 (2023-05-15)
* add option to use right mouse click to preselect characters in combat (based on unofficial patch)
* change mouse cursor position handling
Expand Down
5 changes: 4 additions & 1 deletion games/Septerra Core/release/linux/readme-Linux.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Septerra Core for Linux (x86)
Version 1.04.0.8
Version 1.04.0.9

Original Septerra Core version 1.04 is required for playing.
(version from GOG.com can be used for playing)
Expand Down Expand Up @@ -30,6 +30,9 @@ Setting CPU_SleepMode (in configuration file) to "reduced" can help. If not, the

Changes
-------
v1.04.0.9 (2023-05-17)
* fix moving mouse cursor outside the game area in fullscreen

v1.04.0.8 (2023-05-15)
* add option to use right mouse click to preselect characters in combat (based on unofficial patch)
* change mouse cursor position handling
Expand Down
5 changes: 4 additions & 1 deletion games/Septerra Core/release/windows/readme-Windows.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Septerra Core for Windows (x86)
Version 1.04.0.8
Version 1.04.0.9

Original Septerra Core version 1.04 is required for playing.
(version from GOG.com can be used for playing)
Expand Down Expand Up @@ -36,6 +36,9 @@ Setting CPU_SleepMode (in configuration file) to "reduced" can help. If not, the

Changes
-------
v1.04.0.9 (2023-05-17)
* fix moving mouse cursor outside the game area in fullscreen

v1.04.0.8 (2023-05-15)
* add option to use right mouse click to preselect characters in combat (based on unofficial patch)
* change mouse cursor position handling
Expand Down

0 comments on commit 68c004f

Please sign in to comment.