Re: [hatari-devel] Missing mouse cursor

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On 11/29/18 10:42 AM, Christer Solskogen wrote:
On Wed, Nov 28, 2018 at 11:19 PM Eero Tamminen <oak@xxxxxxxxxxxxxx> wrote:
On 11/28/18 5:11 PM, Christer Solskogen wrote:
When using SDL2 (framebuffer / kmsdrm) on the Tinkerboard (not within
X11)
there's no mouse cursor in hatari menu. The mouse works fine when in GEM.
The amiga emulator Amiberry has implemented something that seems to work,
so perhaps that is something that hatari can do as well?

Wouldn't something like that belong more to SDL itself?

Hatari already does following:
          bOldMouseVisibility = SDL_ShowCursor(SDL_QUERY);
          SDL_ShowCursor(SDL_ENABLE);


Hm.. Perhaps, but I do have a mouse cursor in Amiberry (same SDL library)
and their code is something like this:

                 cursor_surface = SDL_LoadBMP("data/cursor.bmp");
                 swcursor_texture = SDL_CreateTextureFromSurface(renderer,
cursor_surface);
                 // Hide real cursor

SDL_SetCursor(SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_ARROW));
                 SDL_ShowCursor(0);
                 // Set cursor width,height to that of loaded bmp
                 dst.w = cursor_surface->w;
                 dst.h = cursor_surface->h;
                 SDL_FreeSurface(cursor_surface);


We don't have a test setup for this.

You could make the required changes to Dialog_MainDlg() in
src/gui-sdl/dlgMain.c, test that it works *both* on your
FB setup and in X, and post a patch for review.


	- Eero



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/