1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-02-05 16:04:45 +00:00
Commit Graph

21 Commits

Author SHA1 Message Date
Nick Briggs
fab10fc71f Bounds check indexing into intermediate screen buffer
When building with -DCMAKE_BUILD_TYPE=Debug, we assert() that the
index into the intermediate screen buffer is in bounds.
2023-02-19 10:07:28 -08:00
Nick Briggs
a2f8f23152 Keep damage notification boundaries within the current screen
On startup, bitblt calls may be made for the original screen size
and if the new screen size is smaller than that, we must ensure
that damage notifications are contained within the new screen.

Move definition of min() so we can use it in sdl_notify_damage()
2023-02-19 10:07:28 -08:00
Peter
0e731ce02d Cache cursors for SDL. 2023-02-19 10:07:28 -08:00
Peter
0ed7719343 Change Pixelformat to 332 (one byte) instead of 8888 (four bytes). 2023-02-19 10:07:28 -08:00
Nick Briggs
64e0419af3 Fix "error: implicit declaration of function" from dspsubrs
Creates an sdldefs.h, declares a few more functions in sdl.c static,
and includes sdldefs.h in dspsubrs.c when necessary.
2023-02-19 10:07:28 -08:00
Peter
1db44b1f76 Add support for setting the mouse cursor. Not finished!
Currently this just allocates a new X cursor each time, should be
amended to cache the cursor, just like X does at the moment.
2023-02-19 10:07:27 -08:00
Peter
dbba06d9e1 Add support for inverting video and setting mouse position.
Use (IL:VIDEOCOLOR T/NIL) to change inversion.
2023-02-19 10:07:27 -08:00
Peter
cf8ecc1dd4 Add mouse wheel diagnostics. 2023-02-19 10:07:27 -08:00
Peter
380416fa2d Only update texture on damage. 2023-02-19 10:07:27 -08:00
Peter
6f0ca7ad1c Add support for key repeating. 2023-02-19 10:07:27 -08:00
Peter
7573151be8 For now, some more extern functions declarations. 2023-02-19 10:07:27 -08:00
Peter
083d153d43 Maybe fix cmake for SDL2. 2023-02-19 10:07:27 -08:00
Peter
13d367e766 Remove SDL2 directory from include SDL2/SDL.h. 2023-02-19 10:07:27 -08:00
Peter
40b24ec655 Try to make builds pass again. 2023-02-19 10:06:26 -08:00
Peter
6604b3dd06 Add support for -t / -title. 2023-02-19 10:06:24 -08:00
Peter
3b6b203e6c Remove extra directory from includes for SDL. 2023-02-19 10:03:59 -08:00
Peter
948db16ed9 Refactor, only bitblt once per "frame". 2023-02-19 10:03:59 -08:00
Peter
ffacda1278 Refactor, don't update texture on every bitblt. 2023-02-19 10:03:59 -08:00
Peter
e39b650f4d Only bitblt on damage.
Also add an alternative for key handling, which does not work any better...
2023-02-19 10:03:55 -08:00
Peter
a722e01a4f Change SDL backend to accelerated renderer, support pixel scaling.
Edit main.c, init_SDL(1600, 1024, 1) means lisp display size 1600x1024, pixel scaling 1.

Try init_SDL(800, 512, 2) or even init_SDL(608, 1023, 3).
2023-02-19 10:02:25 -08:00
Peter
8cf471bec9 Add prototypical SDL support.
Build with cmake. This will create a new backend (ldesdl).
- Resolution can only be set by editing the variables in sdl.c.
- Key repeat does not work.
- Still problems with keysyms that implicitly contain modifiers.
- The entire screen is bitblted onto the SDL display every frame.

Support keyboard, and work on mouse.

Kind of working...

Fix display resolution problems.
2023-02-19 10:00:21 -08:00