Added a workaround to fix the window resize assertion crash #2

This commit is contained in:
George Sokianos 2022-01-02 21:04:41 +00:00
parent de3e4815ee
commit 7bd164b17e
2 changed files with 21 additions and 13 deletions

View File

@ -32,23 +32,22 @@ SetEnv SAVE HOME "Sys:home/"
```
## TODO list
- Make the application aknowledge of the executable file name. Now it works
only with the filename `lite`
- Fix A1222 compatibility where it runs fine, until the user resize the
window
- Fix loading a folder from terminal using dot (.) as path.
- Fix the resolution of the fullscreen mode
- Find a way to open it in a separated screen, if possible
- Add menu items
- Add information on what needs to be done by the user to make it faster
for low end machines
- Check which extra plugins can be used
- Create a MorphOS port
## Know issues
You can find the known issues at
https://git.walkero.gr/walkero/lite-xl/issues
# Changelog
## [1.16.12.5] -
### Changed
- Changed the Gfx memory leak solution to a fix that was applied by the
editor development team on Lua scripts at a later version. Less custom
code for AmigaOS 4 port.
### Fixed
- Fixed the assertion error and crash when the window is resized
## [1.16.12.4] - 2021-12-31
### Fixed
- Fixed the Gfx memory leak. Now LiteXL frees the reserved memory from the

9
src/renwindow.c Executable file → Normal file
View File

@ -9,6 +9,15 @@ static int query_surface_scale(RenWindow *ren) {
SDL_GetWindowSize(ren->window, &w_points, &h_points);
/* We consider that the ratio pixel/point will always be an integer and
it is the same along the x and the y axis. */
// This is a workaround when the w_pixels != w_points and h_pixels != h_points
// because of redraw delays, especially when the "Resize with contents" is enabled
if (w_pixels != w_points) {
w_pixels = w_points;
}
if (h_pixels != h_points) {
h_pixels = h_points;
}
assert(w_pixels % w_points == 0 && h_pixels % h_points == 0 && w_pixels / w_points == h_pixels / h_points);
return w_pixels / w_points;
}