44 * @file libretro.h
55 * @version 1
66 * @author libretro
7- * @copyright Copyright (C) 2010-2023 The RetroArch team
7+ * @copyright Copyright (C) 2010-2024 The RetroArch team
88 *
99 * @paragraph LICENSE
1010 * The following license statement only applies to this libretro API header (libretro.h).
1111 *
12- * Copyright (C) 2010-2023 The RetroArch team
12+ * Copyright (C) 2010-2024 The RetroArch team
1313 *
1414 * Permission is hereby granted, free of charge,
1515 * to any person obtaining a copy of this software and associated documentation files (the "Software"),
@@ -272,7 +272,10 @@ extern "C" {
272272 * [-0x7fff, 0x7fff]: -0x7fff corresponds to the far left/top of the screen,
273273 * and 0x7fff corresponds to the far right/bottom of the screen.
274274 * The "screen" is here defined as area that is passed to the frontend and
275- * later displayed on the monitor.
275+ * later displayed on the monitor. If the pointer is outside this screen,
276+ * such as in the black surrounding areas when actual display is larger,
277+ * edge position is reported. An explicit edge detection is also provided,
278+ * that will return 1 if the pointer is near the screen edge or actually outside it.
276279 *
277280 * The frontend is free to scale/resize this screen as it sees fit, however,
278281 * (X, Y) = (-0x7fff, -0x7fff) will correspond to the top-left pixel of the
@@ -406,7 +409,8 @@ extern "C" {
406409
407410/* Id values for LIGHTGUN. */
408411#define RETRO_DEVICE_ID_LIGHTGUN_SCREEN_X 13 /*Absolute Position*/
409- #define RETRO_DEVICE_ID_LIGHTGUN_SCREEN_Y 14 /*Absolute*/
412+ #define RETRO_DEVICE_ID_LIGHTGUN_SCREEN_Y 14 /*Absolute Position*/
413+ /** Indicates if lightgun points off the screen or near the edge */
410414#define RETRO_DEVICE_ID_LIGHTGUN_IS_OFFSCREEN 15 /*Status Check*/
411415#define RETRO_DEVICE_ID_LIGHTGUN_TRIGGER 2
412416#define RETRO_DEVICE_ID_LIGHTGUN_RELOAD 16 /*Forced off-screen shot*/
@@ -421,17 +425,18 @@ extern "C" {
421425#define RETRO_DEVICE_ID_LIGHTGUN_DPAD_RIGHT 12
422426/* deprecated */
423427#define RETRO_DEVICE_ID_LIGHTGUN_X 0 /*Relative Position*/
424- #define RETRO_DEVICE_ID_LIGHTGUN_Y 1 /*Relative*/
425- #define RETRO_DEVICE_ID_LIGHTGUN_CURSOR 3 /*Use Aux:A*/
426- #define RETRO_DEVICE_ID_LIGHTGUN_TURBO 4 /*Use Aux:B*/
427- #define RETRO_DEVICE_ID_LIGHTGUN_PAUSE 5 /*Use Start*/
428+ #define RETRO_DEVICE_ID_LIGHTGUN_Y 1 /*Relative Position */
429+ #define RETRO_DEVICE_ID_LIGHTGUN_CURSOR 3 /*Use Aux:A instead */
430+ #define RETRO_DEVICE_ID_LIGHTGUN_TURBO 4 /*Use Aux:B instead */
431+ #define RETRO_DEVICE_ID_LIGHTGUN_PAUSE 5 /*Use Start instead */
428432
429433/* Id values for POINTER. */
430- #define RETRO_DEVICE_ID_POINTER_X 0
431- #define RETRO_DEVICE_ID_POINTER_Y 1
432- #define RETRO_DEVICE_ID_POINTER_PRESSED 2
433- #define RETRO_DEVICE_ID_POINTER_COUNT 3
434-
434+ #define RETRO_DEVICE_ID_POINTER_X 0
435+ #define RETRO_DEVICE_ID_POINTER_Y 1
436+ #define RETRO_DEVICE_ID_POINTER_PRESSED 2
437+ #define RETRO_DEVICE_ID_POINTER_COUNT 3
438+ /** Indicates if pointer is off the screen or near the edge */
439+ #define RETRO_DEVICE_ID_POINTER_IS_OFFSCREEN 15
435440/** @} */
436441
437442/* Returned from retro_get_region(). */
0 commit comments