Open Des-Nerger opened 1 year ago
Ok, I found a fix, even though it's not very efficient:
diff --git a/src/system/libretro/tic80_libretro.c b/src/system/libretro/tic80_libretro.c
index c830d60..fdeb195 100644
--- a/src/system/libretro/tic80_libretro.c
+++ b/src/system/libretro/tic80_libretro.c
@@ -737,8 +737,7 @@ void tic80_libretro_mousecursor(tic80* game, tic80_mouse* mouse, enum mouse_curs
// Determine which cursor to draw.
switch (cursortype) {
case MOUSE_CURSOR_NONE:
- // Nothing.
- break;
+ return;
case MOUSE_CURSOR_DOT:
tic_api_pix(tic, state->mouseX, state->mouseY, state->mouseCursorColor, false);
break;
@@ -753,6 +752,7 @@ void tic80_libretro_mousecursor(tic80* game, tic80_mouse* mouse, enum mouse_curs
tic_api_line(tic, state->mouseX + 3, state->mouseY, state->mouseX, state->mouseY + 3, tic_color_black);
break;
}
+ tic_core_blit(tic);
}
/**
I'm not sure about using tic_core_blit()
here, I think you should draw your cursor directly in the screen buffer game->screen
Yes, that's why I said "it's not very efficient".
But then one had to reimplement the functionality of tic_api_tri
, tic_api_line
and tic_api_pix
, basically reduplicating the code for the case of drawing directly to game->screen
, which imo isn't a very neat solution either.
I think the best way for the libretro core would be to register some kind of event "onBlit", so everytime a .tic game finishes its frame, the cursor is automatically drawn and we would have only one blit call overall. But I don't know if such event system exists in TIC-80. I'm just a user.
Anyway, who's maintaining / responsible-for tic80_libretro.c
now?
Is it still @RobLoach ?
Have you guys even tested the cursor functionality before publishing it? What's the point of having those tic80_mouse_cursor*
libretro options if a cursor doesn't show up anyway?
what's the point....
If the cursor doesn't show up, then a bug appeared somewhere. It did work before.
The code is owned by nesbox. I'm happy to test out any updates though, and push up changes when I'm looking at this thing.
I've done some tests and now suspect it's the whole drawing mechanism inside
void tic80_libretro_mousecursor(...)
oftic80_libretro.c
that isn't working: