Adds an sdl_blt_to_window_surface() that goes directly from the Lisp bitmap
to the window surface avoiding the intermediate copy. This is only coded for a
scale factor of 1. Uses the intermediate buffer if the scale is not 1.
Corrects an error where the damage rectangle was not properly reset.
Using SDL_LockTexture/SDL_UnlockTexture we can gain more direct access to the pixels of the
texture and update them directly from the Lisp screen bitmap.
At the same time, for both the rendering case and the display surface case,
update the pixel format used to be either the first (presumably preferred?)
format for a texture, or the surface format of the window.
Use the SDL routines to pick out the pixel value for Black and White based on the
destination it will be placed in.
If the preprocessor symbol SDLRENDERING is defined the code operates as
it previously did. In the absence of that, we process the Lisp bitmap
into an intermediate form (as before) but then use SDL bitblt to
redraw the intermediate form on the window's surface.
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()
Commit c46fcce307018df6554805050ceb634d72e737c9 fixed a warning for
incompatible pointers to nnewframe() but did not consider that the
order of the DLwords is swapped depending on the endianness of the
system it is running on. Add the necessary GETBASEWORD() macros to
access the items when constructing the pointer.
nnewframe() as called from the EVAL implementation expects to be passed
the address of an array of two DLwords. Do that, and compose the 32-bit
result correctly rather than passing the address of a (32-bit) LispPTR
and then having to swapx() that result to get the expected value.
* Correct warning: cast to smaller integer type -- X_init/lispbitmap
* Fixes to INTRSAFE, INTRSAFE0 and ensure TIMEOUT, TIMEOUT0 used appropriately
INTRSAFE and INTRSAFE0 must clear errno before executing the library or system
call because not all library calls set errno on success.
Avoid casting pointers or larger integer values down to smaller ints before
comparing to 0 or -1, and use NULL (a pointer) rather than 0.
Fix cases where the result of the library call is a pointer rather than an int
to use TIMEOUT0 instead of TIMEOUT, testing for NULL rather than -1
on timeout (errno == EINTR)
* Remove useless validity check of LASTVMEMFILEPAGE_word pointer
* Convert pointer arithmetic type in drawline from int to ptrdiff_t
* Add NOTE warning about a 32-bit vs 64-bit issue affecting currently unused GET_NATIVE_ADDR_FROM_LISP_PTR
No calls to make_atom() depend on the ability to parse the atom's
pname as a number. Additionally, the parse_number() implementation
used here was non-functional.
We remove parse_number() and adjust the parameter list of make_atom()
to remove the non_numericp flag.
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.