Compare commits

...

2 Commits

2 changed files with 8 additions and 1 deletions

View File

@ -40,6 +40,13 @@ https://git.walkero.gr/walkero/lite-xl/issues
## Added ## Added
- Added config.scroll_past_end that when its true lets the user scroll - Added config.scroll_past_end that when its true lets the user scroll
further than the end of the file. By default is set to false. further than the end of the file. By default is set to false.
- Added "SDL_RENDERER_ACCELERATED" and "SDL_RENDERER_PRESENTVSYNC" on
SDL_CreateRenderer() since this reduces the CPU usage when the user
scrolls and seems to work pretty good on my systems (X5000, A1222 and
microAmigaOne). This is exeprimental. If this brings problems on your
system, you can disable them using SDL ENV variable, like below:
setenv SDL_RENDER_VSYNC 0
setenv SDL_RENDER_DRIVER "software"
## [1.16.12.6] - 2022-01-04 ## [1.16.12.6] - 2022-01-04
### Fixed ### Fixed

View File

@ -29,7 +29,7 @@ static void setup_renderer(RenWindow *ren, int w, int h) {
SDL_DestroyTexture(ren->texture); SDL_DestroyTexture(ren->texture);
SDL_DestroyRenderer(ren->renderer); SDL_DestroyRenderer(ren->renderer);
} }
ren->renderer = SDL_CreateRenderer(ren->window, -1, 0); ren->renderer = SDL_CreateRenderer(ren->window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
ren->texture = SDL_CreateTexture(ren->renderer, SDL_PIXELFORMAT_BGRA32, SDL_TEXTUREACCESS_STREAMING, w, h); ren->texture = SDL_CreateTexture(ren->renderer, SDL_PIXELFORMAT_BGRA32, SDL_TEXTUREACCESS_STREAMING, w, h);
ren->surface_scale = query_surface_scale(ren); ren->surface_scale = query_surface_scale(ren);
} }