vice-emu-commit Mailing List for VICE (Page 13)
Versatile Commodore Emulator
Brought to you by:
blackystardust,
gpz
You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
(38) |
May
(60) |
Jun
(122) |
Jul
(148) |
Aug
(178) |
Sep
(151) |
Oct
(131) |
Nov
(208) |
Dec
(129) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(193) |
Feb
(209) |
Mar
(221) |
Apr
(243) |
May
(165) |
Jun
(168) |
Jul
(198) |
Aug
(161) |
Sep
(103) |
Oct
(98) |
Nov
(168) |
Dec
(99) |
| 2010 |
Jan
(263) |
Feb
(156) |
Mar
(57) |
Apr
(93) |
May
(85) |
Jun
(124) |
Jul
(57) |
Aug
(58) |
Sep
(113) |
Oct
(148) |
Nov
(114) |
Dec
(193) |
| 2011 |
Jan
(200) |
Feb
(207) |
Mar
(91) |
Apr
(91) |
May
(142) |
Jun
(104) |
Jul
(115) |
Aug
(137) |
Sep
(266) |
Oct
(91) |
Nov
(85) |
Dec
(186) |
| 2012 |
Jan
(98) |
Feb
(146) |
Mar
(160) |
Apr
(99) |
May
(59) |
Jun
(257) |
Jul
(84) |
Aug
(103) |
Sep
(169) |
Oct
(206) |
Nov
(90) |
Dec
(296) |
| 2013 |
Jan
(294) |
Feb
(130) |
Mar
(36) |
Apr
(14) |
May
(51) |
Jun
(74) |
Jul
(180) |
Aug
(85) |
Sep
(26) |
Oct
(45) |
Nov
(29) |
Dec
(21) |
| 2014 |
Jan
(56) |
Feb
(40) |
Mar
(57) |
Apr
(30) |
May
(31) |
Jun
(11) |
Jul
(107) |
Aug
(135) |
Sep
(142) |
Oct
(195) |
Nov
(139) |
Dec
(133) |
| 2015 |
Jan
(293) |
Feb
(161) |
Mar
(146) |
Apr
(85) |
May
(139) |
Jun
(51) |
Jul
(21) |
Aug
(24) |
Sep
(29) |
Oct
(136) |
Nov
(212) |
Dec
(118) |
| 2016 |
Jan
(119) |
Feb
(165) |
Mar
(229) |
Apr
(219) |
May
(134) |
Jun
(119) |
Jul
(134) |
Aug
(236) |
Sep
(203) |
Oct
(215) |
Nov
(300) |
Dec
(140) |
| 2017 |
Jan
(188) |
Feb
(20) |
Mar
(147) |
Apr
(198) |
May
(26) |
Jun
(21) |
Jul
(67) |
Aug
(219) |
Sep
(209) |
Oct
(194) |
Nov
(144) |
Dec
(99) |
| 2018 |
Jan
(139) |
Feb
(122) |
Mar
(116) |
Apr
(85) |
May
(232) |
Jun
(181) |
Jul
(190) |
Aug
(105) |
Sep
(92) |
Oct
(178) |
Nov
(105) |
Dec
(86) |
| 2019 |
Jan
(119) |
Feb
(79) |
Mar
(74) |
Apr
(117) |
May
(115) |
Jun
(307) |
Jul
(107) |
Aug
(131) |
Sep
(103) |
Oct
(60) |
Nov
(118) |
Dec
(70) |
| 2020 |
Jan
(114) |
Feb
(103) |
Mar
(77) |
Apr
(121) |
May
(193) |
Jun
(110) |
Jul
(214) |
Aug
(210) |
Sep
(179) |
Oct
(260) |
Nov
(237) |
Dec
(334) |
| 2021 |
Jan
(163) |
Feb
(186) |
Mar
(58) |
Apr
(81) |
May
(108) |
Jun
(175) |
Jul
(154) |
Aug
(180) |
Sep
(217) |
Oct
(204) |
Nov
(232) |
Dec
(190) |
| 2022 |
Jan
(253) |
Feb
(134) |
Mar
(229) |
Apr
(190) |
May
(125) |
Jun
(70) |
Jul
(8) |
Aug
(22) |
Sep
(19) |
Oct
(33) |
Nov
(94) |
Dec
(164) |
| 2023 |
Jan
(158) |
Feb
(366) |
Mar
(272) |
Apr
(109) |
May
(198) |
Jun
(226) |
Jul
(200) |
Aug
(94) |
Sep
(108) |
Oct
(62) |
Nov
(175) |
Dec
(116) |
| 2024 |
Jan
(35) |
Feb
(40) |
Mar
(51) |
Apr
(89) |
May
(24) |
Jun
(26) |
Jul
(53) |
Aug
(71) |
Sep
(23) |
Oct
(11) |
Nov
(22) |
Dec
(58) |
| 2025 |
Jan
(26) |
Feb
(40) |
Mar
(107) |
Apr
(39) |
May
(35) |
Jun
(20) |
Jul
(11) |
Aug
(24) |
Sep
(35) |
Oct
(28) |
Nov
(12) |
Dec
|
|
From: <co...@us...> - 2025-03-10 16:38:42
|
Revision: 45520
http://sourceforge.net/p/vice-emu/code/45520
Author: compyx
Date: 2025-03-10 16:38:39 +0000 (Mon, 10 Mar 2025)
Log Message:
-----------
Joystick: BSD: implement enumerating axes, buttons and hats
Obtain code, name and limits on axes, buttons and hats and register them.
Also implement the missing `joystick_device_add_hat()` in shared code.
Modified Paths:
--------------
branches/compyx/joymap-001/vice/src/arch/gtk3/joystickdrv/joystick_bsd.c
branches/compyx/joymap-001/vice/src/joyport/joystick.c
Modified: branches/compyx/joymap-001/vice/src/arch/gtk3/joystickdrv/joystick_bsd.c
===================================================================
--- branches/compyx/joymap-001/vice/src/arch/gtk3/joystickdrv/joystick_bsd.c 2025-03-10 14:44:06 UTC (rev 45519)
+++ branches/compyx/joymap-001/vice/src/arch/gtk3/joystickdrv/joystick_bsd.c 2025-03-10 16:38:39 UTC (rev 45520)
@@ -99,6 +99,7 @@
static void bsd_joy_close(joystick_device_t *joydev);
static void joy_priv_free(void *priv);
+
/** \brief Log for BSD joystick driver */
static log_t bsd_joy_log;
@@ -111,6 +112,12 @@
};
+/** \brief Allocate new private data object
+ *
+ * Allocate and initialize private data object instance.
+ *
+ * \return new data object
+ */
static joy_priv_t *joy_priv_new(void)
{
joy_priv_t *priv = lib_malloc(sizeof *priv);
@@ -123,6 +130,13 @@
return priv;
}
+/** \brief Free private data instance
+ *
+ * Free private data object and its resources.
+ * Closes file descriptor, cleans up HID report descriptor and free HID buffer.
+ *
+ * \param[in] priv private data object
+ */
static void joy_priv_free(void *priv)
{
joy_priv_t *p = priv;
@@ -139,7 +153,6 @@
}
}
-
static bool bsd_joy_open (int joyport, joystick_device_t *joydev)
{
return true; /* NOP */
@@ -155,7 +168,6 @@
/* NOP */
}
-
/** \brief scandir select callback
*
* Check if name matches "uhid?*".
@@ -191,7 +203,6 @@
return path;
}
-
/** \brief Open device for HID usage
*
* Open \c node and get associated HID data from it for scanning/polling.
@@ -260,7 +271,140 @@
return priv;
}
+/** \brief Add axis to joystick device
+ *
+ * \param[in] joydev joystick device
+ * \param[in] item HID item with axis information
+ *
+ */
+static void add_joy_axis(joystick_device_t *joydev,
+ const struct hid_item *item)
+{
+ joystick_axis_t axis;
+ joystick_axis_init(&axis);
+ axis.code = (uint16_t)HID_USAGE(item->usage);
+ axis.name = lib_strdup(hid_usage_in_page(item->usage));
+ axis.minimum = item->logical_minimum;
+ axis.maximum = item->logical_maximum;
+
+ log_message(bsd_joy_log, "axis %u: %s", (unsigned int)axis.code, axis.name);
+ joystick_device_add_axis(joydev, &axis);
+ lib_free(axis.name);
+}
+
+/** \brief Add button to joystick device
+ *
+ * \param[in] joydev joystick device
+ * \param[in] item HID item with button information
+ */
+static void add_joy_button(joystick_device_t *joydev,
+ const struct hid_item *item)
+{
+ joystick_button_t button;
+
+ joystick_button_init(&button);
+ button.code = (uint16_t)HID_USAGE(item->usage);
+ /* NetBSD usbhid man page lies, function below returns `const char *`,
+ * not `char *`, so we need a temporary copy:
+ */
+ button.name = lib_strdup(hid_usage_in_page(item->usage));
+ log_message(bsd_joy_log, "button %u: %s", (unsigned int)button.code, button.name);
+ joystick_device_add_button(joydev, &button);
+ lib_free(button.name);
+}
+
+/** \brief Add hat to joystick device
+ *
+ * \param[in] joydev joystick device
+ * \param[in] item HID item with hat information
+ */
+static void add_joy_hat(joystick_device_t *joydev,
+ const struct hid_item *item)
+{
+ joystick_hat_t hat;
+
+ joystick_hat_init(&hat);
+ hat.code = (uint16_t)HID_USAGE(item->usage);
+ hat.name = lib_strdup(hid_usage_in_page(item->usage));
+ log_message(bsd_joy_log, "hat %u: %s", (unsigned int)hat.code, hat.name);
+ joystick_device_add_hat(joydev, &hat);
+ lib_free(hat.name);
+}
+
+/** \brief Scan device for inputs
+ *
+ * Scan \a joydev for axes, buttons and hats and register them with \a joydev.
+ *
+ * \param[in] joydev joystick device
+ *
+ * \return \c true on succes
+ */
+static bool scan_inputs(joystick_device_t *joydev)
+{
+ joy_priv_t *priv;
+ struct hid_data *hdata;
+ struct hid_item hitem;
+
+ priv = joydev->priv;
+ hdata = hid_start_parse(priv->rep_desc, 1 << hid_input, priv->rep_id);
+ if (hdata == NULL) {
+ log_error(bsd_joy_log, "hid_start_parse() failed: %s,", strerror(errno));
+ return false;
+ }
+
+ while (hid_get_item(hdata, &hitem) > 0) {
+ unsigned int page = HID_PAGE (hitem.usage);
+ int usage = HID_USAGE(hitem.usage);
+
+ switch (page) {
+ case HUP_GENERIC_DESKTOP:
+ switch (usage) {
+ case HUG_X: /* fall through */
+ case HUG_Y: /* fall through */
+ case HUG_Z: /* fall through */
+ case HUG_RX: /* fall through */
+ case HUG_RY: /* fall through */
+ case HUG_RZ: /* fall through */
+ case HUG_SLIDER:
+ /* got an axis */
+ add_joy_axis(joydev, &hitem);
+ break;
+ case HUG_HAT_SWITCH:
+ /* hat, seems to be D-Pad on Logitech F710 */
+ add_joy_hat(joydev, &hitem);
+ break;
+ case HUG_D_PAD_UP: /* fall through */
+ case HUG_D_PAD_DOWN: /* fall through */
+ case HUG_D_PAD_LEFT: /* fall through */
+ case HUG_D_PAD_RIGHT:
+ /* treat D-Pad as buttons */
+ add_joy_button(joydev, &hitem);
+ break;
+ default:
+ break;
+ }
+ break;
+ case HUP_BUTTON:
+ /* usage appears to be the button number */
+ add_joy_button(joydev, &hitem);
+ break;
+ default:
+ break;
+ }
+ }
+
+ hid_end_parse(hdata);
+ return true;
+}
+
+
+/** \brief Scan joystick device for capabilities
+ *
+ * \param[in] node device node to scan
+ *
+ * \return new joystick device instance or <tt>NULL</tt> on error
+ */
static joystick_device_t *scan_device(const char *node)
{
joystick_device_t *joydev;
@@ -294,14 +438,13 @@
joydev->vendor = devinfo.udi_vendorNo;
joydev->product = devinfo.udi_productNo;
- /* TODO: scan inputs */
-
-
joydev->priv = priv;
return joydev;
}
+/** \brief Initialize BSD joystick driver and add available devices
+ */
void bsd_joystick_init(void)
{
struct dirent **namelist = NULL;
@@ -312,6 +455,11 @@
log_message(bsd_joy_log, "Registering driver.");
joystick_driver_register(&driver);
+ /* Initialize HID library so we can retrieve strings for page and usage;
+ * without this button names will be "0x00001" etc, not very informative.
+ */
+ hid_init(NULL);
+
log_message(bsd_joy_log, "Scanning available devices:");
nl_count = scandir(ROOT_NODE, &namelist, sd_select, NULL);
if (nl_count < 0) {
@@ -328,12 +476,13 @@
joystick_device_t *joydev;
char *node;
- node = full_node_path(namelist[n]->d_name);
-// log_message(bsd_joy_log, "scanning %s", node);
-
+ node = full_node_path(namelist[n]->d_name);
joydev = scan_device(node);
if (joydev != NULL) {
log_message(bsd_joy_log, "%s: %s", joydev->node, joydev->name);
+ if (!scan_inputs(joydev)) {
+ joystick_device_free(joydev);
+ }
joystick_device_free(joydev);
}
Modified: branches/compyx/joymap-001/vice/src/joyport/joystick.c
===================================================================
--- branches/compyx/joymap-001/vice/src/joyport/joystick.c 2025-03-10 14:44:06 UTC (rev 45519)
+++ branches/compyx/joymap-001/vice/src/joyport/joystick.c 2025-03-10 16:38:39 UTC (rev 45520)
@@ -3521,3 +3521,23 @@
joydev->num_axes++;
}
+
+
+void joystick_device_add_hat(joystick_device_t *joydev,
+ joystick_hat_t *hat)
+{
+ joystick_hat_t *new_hat;
+
+ if (joydev->num_hats == joydev->max_hats) {
+ joydev->num_hats *= 2;
+ joydev->hats = lib_realloc(joydev->hats,
+ sizeof *joydev->hats * (size_t)joydev->max_hats);
+ }
+
+ new_hat = &joydev->hats[joydev->num_hats];
+ joystick_hat_init(new_hat);
+ new_hat->code = hat->code;
+ new_hat->name = lib_strdup(hat->name);
+
+ joydev->num_hats++;
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-03-10 14:44:18
|
Revision: 45519
http://sourceforge.net/p/vice-emu/code/45519
Author: compyx
Date: 2025-03-10 14:44:06 +0000 (Mon, 10 Mar 2025)
Log Message:
-----------
Joystick: BSD: wrap opening and getting HID report data in separate function
Add `joy_hid_open()` to open() a device and get HID report desc, ID and size and allocate a buffer for parsing reports. To be used in a future `open()` method of the driver as well as device capability scanning.
Modified Paths:
--------------
branches/compyx/joymap-001/vice/src/arch/gtk3/joystickdrv/joystick_bsd.c
Modified: branches/compyx/joymap-001/vice/src/arch/gtk3/joystickdrv/joystick_bsd.c
===================================================================
--- branches/compyx/joymap-001/vice/src/arch/gtk3/joystickdrv/joystick_bsd.c 2025-03-10 10:14:46 UTC (rev 45518)
+++ branches/compyx/joymap-001/vice/src/arch/gtk3/joystickdrv/joystick_bsd.c 2025-03-10 14:44:06 UTC (rev 45519)
@@ -87,7 +87,7 @@
typedef struct joy_priv_s {
void *buffer;
report_desc_t rep_desc;
- ssize_t rep_size;
+ int rep_size;
int rep_id;
int fd;
} joy_priv_t;
@@ -192,32 +192,32 @@
}
-static joystick_device_t *scan_device(const char *node)
+/** \brief Open device for HID usage
+ *
+ * Open \c node and get associated HID data from it for scanning/polling.
+ * This function opens the device and allocates a buffer for HID reports, gets
+ * the report ID and size and allocates a \c joy_priv_t instance with all that
+ * data.
+ *
+ * \param[in] node path in <tt>/dev/</tt> to the device
+ *
+ * \return new initialized \c joy_priv_t instance or <tt>NULL</tt> on error
+ */
+static joy_priv_t *joy_hid_open(const char *node)
{
- joystick_device_t *joydev;
- joy_priv_t *priv;
- struct usb_device_info devinfo;
- report_desc_t report;
- int rep_id;
- int rep_size;
- int fd;
- char *name;
+ joy_priv_t *priv;
+ report_desc_t rep_desc;
+ int rep_id;
+ int rep_size;
+ int fd;
-
- fd = open(node, O_RDONLY, O_NONBLOCK);
+ fd = open(node, O_RDONLY|O_NONBLOCK);
if (fd < 0) {
- /* don't log error, BSD allocates 16 nodes in /dev, not all valid*/
- /* log_error(bsd_joy_log, "failed to open %s: %s", node, strerror(errno)); */
+ /* don't log, (Net)BSD allocates a lot of nodes in /dev that aren't
+ * actually valid */
return NULL;
}
- /* get device info for vendor and product */
- if (ioctl(fd, USB_GET_DEVICEINFO, &devinfo) < 0) {
- log_error(bsd_joy_log, "failed to get USB device info: %s", strerror(errno));
- close(fd);
- return NULL;
- }
-
/* get report ID if possible, else asume 0 */
#ifdef USB_GET_REPORT_ID
if (ioctl(fd, USB_GET_REPORT_ID, &rep_id) < 0) {
@@ -229,8 +229,9 @@
rep_id = 0;
#endif
- report = hid_get_report_desc(fd);
- if (report == NULL) {
+ /* get report description */
+ rep_desc = hid_get_report_desc(fd);
+ if (rep_desc == NULL) {
log_error(bsd_joy_log,
"failed to get HID report for %s: %s",
node, strerror(errno));
@@ -238,14 +239,47 @@
return NULL;
}
- rep_size = hid_report_size(report, hid_input, rep_id);
+ /* get report size */
+ rep_size = hid_report_size(rep_desc, hid_input, rep_id);
if (rep_size <= 0) {
log_error(bsd_joy_log, "invalid report size of %d", rep_size);
- hid_dispose_report_desc(report);
+ hid_dispose_report_desc(rep_desc);
close(fd);
return NULL;
}
+ /* success: allocate private data object and store what we need for polling
+ * and further querying */
+ priv = joy_priv_new();
+ priv->buffer = lib_malloc((size_t)rep_size);
+ priv->rep_desc = rep_desc;
+ priv->rep_size = rep_size;
+ priv->rep_id = rep_id;
+ priv->fd = fd;
+
+ return priv;
+}
+
+
+static joystick_device_t *scan_device(const char *node)
+{
+ joystick_device_t *joydev;
+ joy_priv_t *priv;
+ struct usb_device_info devinfo;
+ char *name;
+
+ /* try to open device and get HID report information */
+ priv = joy_hid_open(node);
+ if (priv == NULL) {
+ return NULL;
+ }
+
+ /* get device info for vendor and product */
+ if (ioctl(priv->fd, USB_GET_DEVICEINFO, &devinfo) < 0) {
+ log_error(bsd_joy_log, "failed to get USB device info: %s", strerror(errno));
+ joy_priv_free(priv);
+ return NULL;
+ }
if (*devinfo.udi_vendor == '\0' && *devinfo.udi_product == '\0') {
/* fall back to device node as name */
name = lib_strdup(node);
@@ -262,12 +296,6 @@
/* TODO: scan inputs */
- priv = joy_priv_new();
- priv->buffer = lib_malloc((size_t)rep_size);
- priv->rep_desc = report;
- priv->rep_size = rep_size;
- priv->rep_id = rep_id;
- priv->fd = fd; /* can be removed once we actually use driver->open() */
joydev->priv = priv;
return joydev;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-03-10 10:14:59
|
Revision: 45518
http://sourceforge.net/p/vice-emu/code/45518
Author: compyx
Date: 2025-03-10 10:14:46 +0000 (Mon, 10 Mar 2025)
Log Message:
-----------
Joystick: start work on NetBSD/FreeBSD driver
Delete all old code and start from scratch. Scanning '/dev/uhid?*' works with
some basic info gathered like device name, node, vendor and product, along with
HID report data to be used for polling later.
Modified Paths:
--------------
branches/compyx/joymap-001/vice/src/arch/gtk3/joystickdrv/joystick_bsd.c
branches/compyx/joymap-001/vice/src/joyport/joystick.c
branches/compyx/joymap-001/vice/src/joyport/joystick.h
Modified: branches/compyx/joymap-001/vice/src/arch/gtk3/joystickdrv/joystick_bsd.c
===================================================================
--- branches/compyx/joymap-001/vice/src/arch/gtk3/joystickdrv/joystick_bsd.c 2025-03-09 14:29:02 UTC (rev 45517)
+++ branches/compyx/joymap-001/vice/src/arch/gtk3/joystickdrv/joystick_bsd.c 2025-03-10 10:14:46 UTC (rev 45518)
@@ -1,8 +1,7 @@
/** \file joystick_bsd.c
- * \brief NetBSD/FreeBSD/DragonFly USB joystick support
+ * \brief NetBSD/FreeBSD USB joystick support
*
- * \author Dieter Baron <di...@ni...>
- * \author Marco van den Heuvel <bla...@ya...>
+ * \author Bas Wassink <b.w...@zi...>
*
* \todo Check if this code also works on OpenBSD.
*/
@@ -30,11 +29,46 @@
#include "vice.h"
-
+#include <stdio.h>
+#include <string.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <errno.h>
+#include <dirent.h>
#include <fcntl.h>
-#include <stdio.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
#include <unistd.h>
+#include <usbhid.h>
+#ifdef FREEBSD_COMPILE
+/* for hid_* and HUG_* */
+#include <dev/hid/hid.h>
+/* for struct usb_device_info */
+#include <dev/usb/usb_ioctl.h>
+#endif
+
+#ifdef NETBSD_COMPILE
+#include <dev/usb/usb.h>
+#include <dev/usb/usbhid.h>
+#include <dev/hid/hid.h>
+
+/* FreeBSD (9.3) doesn't have the D-Pad defines */
+#ifndef HUG_D_PAD_UP
+#define HUG_D_PAD_UP 0x0090
+#endif
+#ifndef HUG_D_PAD_DOWN
+#define HUG_D_PAD_DOWN 0x0091
+#endif
+#ifndef HUG_D_PAD_RIGHT
+#define HUG_D_PAD_RIGHT 0x0092
+#endif
+#ifndef HUG_D_PAD_LEFT
+#define HUG_D_PAD_LEFT 0x0093
+#endif
+
+#endif /* NETBSD_COMPILE */
+
#include "cmdline.h"
#include "joystick.h"
#include "keyboard.h"
@@ -42,346 +76,242 @@
#include "log.h"
#include "resources.h"
#include "types.h"
+#include "util.h"
+#define ROOT_NODE "/dev"
+#define ROOT_NODE_LEN 4
+#define NODE_PREFIX "uhid"
+#define NODE_PREFIX_LEN 4
-#define ITEM_AXIS 0
-#define ITEM_BUTTON 1
-#define ITEM_HAT 2
-static log_t bsd_joystick_log;
+typedef struct joy_priv_s {
+ void *buffer;
+ report_desc_t rep_desc;
+ ssize_t rep_size;
+ int rep_id;
+ int fd;
+} joy_priv_t;
-#ifdef HAVE_USB_H
-#include <usb.h>
-#endif
-#ifdef DRAGONFLYBSD_COMPILE
-/* sys/param.h contains the __DragonFly_version macro */
-# include <sys/param.h>
-# if __DragonFly_version >= 300200
-/* DragonFly >= 3.2 (USB4BSD stack) */
-# include <bus/u4b/usb.h>
-# include <bus/u4b/usbhid.h>
-# else
-/* DragonFly < 3.2: old USB stack */
-# include <bus/usb/usb.h>
-# include <bus/usb/usbhid.h>
-# endif
-#else
-# ifdef FREEBSD_COMPILE
-# include <sys/ioccom.h>
-# endif
-# include <dev/usb/usb.h>
-# include <dev/usb/usbhid.h>
-#endif
+/* Forward declarations */
+static bool bsd_joy_open (int joyport, joystick_device_t *joydev);
+static void bsd_joy_poll (int joyport, joystick_device_t *joydev);
+static void bsd_joy_close(joystick_device_t *joydev);
+static void joy_priv_free(void *priv);
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
+/** \brief Log for BSD joystick driver */
+static log_t bsd_joy_log;
-#if defined(HAVE_USBHID_H)
-#include <usbhid.h>
-#elif defined(HAVE_LIBUSB_H)
-#include <libusb.h>
-#elif defined(HAVE_LIBUSBHID_H)
-#include <libusbhid.h>
-#endif
+/** \brief BSD joystick driver declaration */
+static joystick_driver_t driver = {
+ .open = bsd_joy_open,
+ .poll = bsd_joy_poll,
+ .close = bsd_joy_close,
+ .priv_free = joy_priv_free
+};
-#define MAX_DEV 16 /* number of uhid devices to try (NetBSD 9.3 has 16
- /dev/uhid* nodes) */
+static joy_priv_t *joy_priv_new(void)
+{
+ joy_priv_t *priv = lib_malloc(sizeof *priv);
-/*
- * This hat map was created from values observed on NetBSD 9.2
- * with an analog joystick "ADDISON TECHNOLOGY" that also has a hat switch.
- * uhidev1 at uhub1 port 6 configuration 1 interface 0
- * uhidev1: vendor 0907 (0x907) product 0523 (0x523), rev 1.00/1.00, addr 40, iclass 3/0
- * uhid0 at uhidev1: input=3, output=0, feature=0
- *
- * Only 0 and the odd values (horizontal and vertical) were observed
- * but let's leave the diagonals in too, just in case.
- *
- * There are apparently hats with 0 for neutral and 1 for up, and some
- * with 8 for neutral and 0 for up. The other values are off by 1.
- * We try to autodetect, by seeing which of 0 or 8 occurs first.
- * We report no direction until one of those is seen.
- */
-#define MAX_HAT_MAP_INDEX 8
-static const uint8_t hat_map[MAX_HAT_MAP_INDEX + 2] = {
- 0, /* 0 */
- JOYSTICK_DIRECTION_UP, /* 1 */
- JOYSTICK_DIRECTION_UP | JOYSTICK_DIRECTION_RIGHT, /* 2 */
- JOYSTICK_DIRECTION_RIGHT, /* 3 */
- JOYSTICK_DIRECTION_RIGHT | JOYSTICK_DIRECTION_DOWN, /* 4 */
- JOYSTICK_DIRECTION_DOWN, /* 5 */
- JOYSTICK_DIRECTION_DOWN | JOYSTICK_DIRECTION_LEFT, /* 6 */
- JOYSTICK_DIRECTION_LEFT, /* 7 */
- JOYSTICK_DIRECTION_LEFT | JOYSTICK_DIRECTION_UP, /* 8 */
- 0, /* 9 */
-};
+ priv->buffer = NULL;
+ priv->rep_desc = NULL;
+ priv->rep_size = 0;
+ priv->fd = -1;
+ priv->rep_id = 0;
+ return priv;
+}
-struct usb_joy_item {
- struct hid_item item;
- struct usb_joy_item *next;
+static void joy_priv_free(void *priv)
+{
+ joy_priv_t *p = priv;
- int type;
- int min_val;
- int max_val;
- int ordinal_number;
-};
+ if (p != NULL) {
+ if (p->fd >= 0) {
+ close(p->fd);
+ }
+ lib_free(p->buffer);
+ if (p->rep_desc != NULL) {
+ hid_dispose_report_desc(p->rep_desc);
+ }
+ lib_free(p);
+ }
+}
-typedef struct bsd_joystick_priv_s {
- struct usb_joy_item *usb_joy_item;
- char *usb_joy_buf;
- int usb_joy_fd;
- int usb_joy_size;
-} bsd_joystick_priv_t;
-static void usb_joy_add_item(struct usb_joy_item **item, struct hid_item *hi, int orval, int type)
+static bool bsd_joy_open (int joyport, joystick_device_t *joydev)
{
- struct usb_joy_item *it;
- int w;
+ return true; /* NOP */
+}
- it = lib_malloc(sizeof *it);
- it->next = *item;
- *item = it;
+static void bsd_joy_poll (int joyport, joystick_device_t *joydev)
+{
+ /* NOP */
+}
- memcpy(&it->item, hi, sizeof(*hi));
- it->type = type;
- it->ordinal_number = orval;
-
- switch (type) {
- case ITEM_AXIS:
- w = (hi->logical_maximum - hi->logical_minimum) / 3;
- it->min_val = hi->logical_minimum + w;
- it->max_val = hi->logical_maximum - w;
- break;
- case ITEM_BUTTON:
- it->min_val = hi->logical_minimum;
- it->max_val = hi->logical_maximum - 1;
- break;
- case ITEM_HAT:
- it->min_val = -1; /* mapping not autodetected yet */
- break;
- }
+static void bsd_joy_close(joystick_device_t *joydev)
+{
+ /* NOP */
}
-static void usb_free_item(struct usb_joy_item **item)
+
+/** \brief scandir select callback
+ *
+ * Check if name matches "uhid?*".
+ *
+ * \param[in] de directory entry
+ *
+ * \return non-0 when matching "uhid?*"
+ */
+static int sd_select(const struct dirent *de)
{
- struct usb_joy_item *it, *it2;
+ const char *name = de->d_name;
- it=*item;
- while (it) {
- it2 = it;
- it = it->next;
- lib_free(it2);
- }
- *item = NULL;
+ return ((strlen(name) >= NODE_PREFIX_LEN + 1u) &&
+ (strncmp(NODE_PREFIX, name, NODE_PREFIX_LEN) == 0));
}
-static void usb_joystick_close(void* priv)
+/** \brief Get full path of UHID device node
+ *
+ * \param[in] node node in /dev/
+ *
+ * \return full path to \a node
+ * \note free with \c lib_free() after use
+ */
+static char *full_node_path(const char *node)
{
- bsd_joystick_priv_t *joypriv = priv;
- close(joypriv->usb_joy_fd);
- usb_free_item(&joypriv->usb_joy_item);
- lib_free(priv);
+ size_t nlen = strlen(node);
+ size_t plen = ROOT_NODE_LEN + 1u + nlen + 1u;
+ char *path = lib_malloc(plen);
+
+ memcpy(path, ROOT_NODE, ROOT_NODE_LEN);
+ path[ROOT_NODE_LEN] = '/';
+ memcpy(path + ROOT_NODE_LEN + 1, node, nlen + 1u);
+ return path;
}
-static void usb_joystick(int jp, void* priv)
+
+static joystick_device_t *scan_device(const char *node)
{
- int val;
- ssize_t ret;
- struct usb_joy_item *it;
- bsd_joystick_priv_t *joypriv = priv;
+ joystick_device_t *joydev;
+ joy_priv_t *priv;
+ struct usb_device_info devinfo;
+ report_desc_t report;
+ int rep_id;
+ int rep_size;
+ int fd;
+ char *name;
- val = 0;
- while ((ret = read(joypriv->usb_joy_fd, joypriv->usb_joy_buf, joypriv->usb_joy_size)) == joypriv->usb_joy_size) {
- val = 1;
+
+ fd = open(node, O_RDONLY, O_NONBLOCK);
+ if (fd < 0) {
+ /* don't log error, BSD allocates 16 nodes in /dev, not all valid*/
+ /* log_error(bsd_joy_log, "failed to open %s: %s", node, strerror(errno)); */
+ return NULL;
}
- if (ret != -1 && errno != EAGAIN) {
- /* XXX */
- log_warning(bsd_joystick_log, "strange read return: %zd/%d", ret, errno);
- return;
+
+ /* get device info for vendor and product */
+ if (ioctl(fd, USB_GET_DEVICEINFO, &devinfo) < 0) {
+ log_error(bsd_joy_log, "failed to get USB device info: %s", strerror(errno));
+ close(fd);
+ return NULL;
}
- if (!val) {
- return;
+
+ /* get report ID if possible, else asume 0 */
+#ifdef USB_GET_REPORT_ID
+ if (ioctl(fd, USB_GET_REPORT_ID, &rep_id) < 0) {
+ log_warning(bsd_joy_log, "USB_GET_REPORT_ID failed.");
+ close(fd);
+ return NULL;
}
+#else
+ rep_id = 0;
+#endif
- for (it = joypriv->usb_joy_item; it; it = it->next) {
- val = hid_get_data(joypriv->usb_joy_buf, &it->item);
- if (it->type == ITEM_HAT) {
- if (val >= 0 && val <= MAX_HAT_MAP_INDEX) {
- /* Autodect if 0 is neutral, or 8 */
- if (it->min_val < 0) {
- if (val == 0) {
- it->min_val = 0;
- } else if (val == 8) {
- it->min_val = 1;
- } else {
- /* Not yet autodetected */
- }
- /* Report neutral position for now */
- joy_hat_event(jp, it->ordinal_number, 0);
- } else {
- val += it->min_val;
- joy_hat_event(jp, it->ordinal_number, hat_map[val]);
- }
- }
- } else {
- if (it->type == ITEM_BUTTON) {
- joy_button_event(jp, it->ordinal_number, val);
- } else if (val <= it->min_val) {
- joy_axis_event(jp, it->ordinal_number, JOY_AXIS_NEGATIVE);
- } else if (val > it->max_val) {
- joy_axis_event(jp, it->ordinal_number, JOY_AXIS_POSITIVE);
- } else {
- joy_axis_event(jp, it->ordinal_number, JOY_AXIS_MIDDLE);
- }
- }
+ report = hid_get_report_desc(fd);
+ if (report == NULL) {
+ log_error(bsd_joy_log,
+ "failed to get HID report for %s: %s",
+ node, strerror(errno));
+ close(fd);
+ return NULL;
}
-}
-static joystick_driver_t bsd_joystick_driver = {
- .poll = usb_joystick,
- .close = usb_joystick_close
-};
+ rep_size = hid_report_size(report, hid_input, rep_id);
+ if (rep_size <= 0) {
+ log_error(bsd_joy_log, "invalid report size of %d", rep_size);
+ hid_dispose_report_desc(report);
+ close(fd);
+ return NULL;
+ }
-void usb_joystick_init(void)
-{
- int j, id = 0, fd;
- report_desc_t report;
- struct hid_item h;
- struct hid_data *d;
- char dev[32];
- char name[20];
- int next_ordinal_to_assign;
- int ordinal_to_assign;
- int found_x;
- int found_y;
- struct usb_joy_item *it;
- char axes = 0, buttons = 0, hats = 0;
- bsd_joystick_priv_t *priv;
- int usb_joy_size;
+ if (*devinfo.udi_vendor == '\0' && *devinfo.udi_product == '\0') {
+ /* fall back to device node as name */
+ name = lib_strdup(node);
+ } else {
+ name = util_concat(devinfo.udi_vendor, " ", devinfo.udi_product, NULL);
+ }
- for (j=0; j<MAX_DEV; j++) {
- axes = 0;
- buttons = 0;
- hats = 0;
- next_ordinal_to_assign = 0;
+ /* now we can allocate the joystick device instance and its data */
+ joydev = joystick_device_new();
+ joydev->node = lib_strdup(node);
+ joydev->name = name;
+ joydev->vendor = devinfo.udi_vendorNo;
+ joydev->product = devinfo.udi_productNo;
- sprintf(dev, "/dev/uhid%d", j);
- fd = open(dev, O_RDONLY | O_NONBLOCK);
- if (fd < 0) {
- continue;
- }
+ /* TODO: scan inputs */
-#if defined(USB_GET_REPORT_ID) && !defined(DRAGONFLYBSD_COMPILE)
- if (ioctl(fd, USB_GET_REPORT_ID, &id) < 0) {
- log_warning(bsd_joystick_log, "Cannot get report id for joystick device `%s'.", dev);
- close(fd);
- }
-#endif
+ priv = joy_priv_new();
+ priv->buffer = lib_malloc((size_t)rep_size);
+ priv->rep_desc = report;
+ priv->rep_size = rep_size;
+ priv->rep_id = rep_id;
+ priv->fd = fd; /* can be removed once we actually use driver->open() */
- if ((report=hid_get_report_desc(fd)) == NULL) {
- log_warning(bsd_joystick_log, "Cannot report description for joystick device `%s'.", dev);
- close(fd);
- continue;
- }
- usb_joy_size = hid_report_size(report, hid_input, id);
+ joydev->priv = priv;
+ return joydev;
+}
- next_ordinal_to_assign = 2;
- found_x = 0;
- found_y = 0;
- priv = NULL;
-#if !defined(HAVE_USBHID_H) && !defined(HAVE_LIBUSB_H) && defined(HAVE_LIBUSBHID)
- for (d = hid_start_parse(report, id);
-#else
- for (d = hid_start_parse(report, 1 << hid_input, id);
-#endif
- hid_get_item(d, &h);) {
- if (h.kind == hid_collection && HID_PAGE(h.usage) == HUP_GENERIC_DESKTOP && (HID_USAGE(h.usage) == HUG_JOYSTICK || HID_USAGE(h.usage) == HUG_GAME_PAD)) {
- if (priv == NULL) {
- priv = lib_malloc(sizeof(bsd_joystick_priv_t));
- priv->usb_joy_size = usb_joy_size;
- priv->usb_joy_item = NULL;
- }
- continue;
- }
- if (!priv) {
- continue;
- }
+void bsd_joystick_init(void)
+{
+ struct dirent **namelist = NULL;
+ int nl_count;
+ int n;
- switch (HID_PAGE(h.usage)) {
- case HUP_GENERIC_DESKTOP:
- switch (HID_USAGE(h.usage)) {
- case HUG_X:
- case HUG_RX:
- if (!found_x) {
- ordinal_to_assign = 0;
- } else {
- ordinal_to_assign = next_ordinal_to_assign;
- }
- usb_joy_add_item(&priv->usb_joy_item, &h, ordinal_to_assign, ITEM_AXIS);
- axes++;
- if (!found_x) {
- found_x = 1;
- } else {
- next_ordinal_to_assign++;
- }
- break;
- case HUG_Y:
- case HUG_RY:
- if (!found_y) {
- ordinal_to_assign = 1;
- } else {
- ordinal_to_assign = next_ordinal_to_assign;
- }
- usb_joy_add_item(&priv->usb_joy_item, &h, ordinal_to_assign, ITEM_AXIS);
- axes++;
- if (!found_y) {
- found_y = 1;
- } else {
- next_ordinal_to_assign++;
- }
- break;
- case HUG_HAT_SWITCH:
- usb_joy_add_item(&priv->usb_joy_item, &h, hats, ITEM_HAT);
- hats++;
- break;
- }
- break;
- case HUP_BUTTON:
- usb_joy_add_item(&priv->usb_joy_item, &h, buttons, ITEM_BUTTON);
- buttons++;
- break;
- }
- }
+ bsd_joy_log = log_open("BSD Joystick");
+ log_message(bsd_joy_log, "Registering driver.");
+ joystick_driver_register(&driver);
- hid_end_parse(d);
- hid_dispose_report_desc(report);
- if (!priv) {
- continue;
- }
- if (!found_x || !found_y) {
- next_ordinal_to_assign = 0;
- for (it = priv->usb_joy_item; it; it = it->next) {
- if (it->type == ITEM_AXIS) {
- it->ordinal_number = next_ordinal_to_assign++;
- }
- }
- }
+ log_message(bsd_joy_log, "Scanning available devices:");
+ nl_count = scandir(ROOT_NODE, &namelist, sd_select, NULL);
+ if (nl_count < 0) {
+ log_warning(bsd_joy_log,
+ "scandir(\"%s/%s?*\") failed, giving up.",
+ ROOT_NODE, NODE_PREFIX);
+ return;
+ } else if (nl_count == 0) {
+ log_message(bsd_joy_log, "no devices found.");
+ return;
+ }
- if ((priv->usb_joy_buf = malloc(priv->usb_joy_size)) == NULL) {
- log_warning(bsd_joystick_log, "Cannot allocate buffer for joystick device `%s'.", dev);
- close(fd);
- usb_free_item(&priv->usb_joy_item);
- lib_free(priv);
- continue;
+ for (n = 0; n < nl_count; n++) {
+ joystick_device_t *joydev;
+ char *node;
+
+ node = full_node_path(namelist[n]->d_name);
+// log_message(bsd_joy_log, "scanning %s", node);
+
+ joydev = scan_device(node);
+ if (joydev != NULL) {
+ log_message(bsd_joy_log, "%s: %s", joydev->node, joydev->name);
+
+ joystick_device_free(joydev);
}
+ lib_free(node);
+ free(namelist[n]);
+ }
- log_message(bsd_joystick_log, "USB joystick found: `%s'.", dev);
- priv->usb_joy_fd = fd;
- snprintf(name, sizeof(name), "Joystick %d", j);
- register_joystick_driver(&bsd_joystick_driver, name, priv, axes, buttons, hats);
- }
+ free(namelist);
}
Modified: branches/compyx/joymap-001/vice/src/joyport/joystick.c
===================================================================
--- branches/compyx/joymap-001/vice/src/joyport/joystick.c 2025-03-09 14:29:02 UTC (rev 45517)
+++ branches/compyx/joymap-001/vice/src/joyport/joystick.c 2025-03-10 10:14:46 UTC (rev 45518)
@@ -2721,7 +2721,7 @@
#elif defined(HAVE_LINUX_EVDEV)
linux_joystick_evdev_init();
#elif defined HAS_USB_JOYSTICK
- usb_joystick_init();
+ bsd_joystick_init();
#elif defined MAC_JOYSTICK
joy_hidlib_init();
#elif defined HAVE_DINPUT
Modified: branches/compyx/joymap-001/vice/src/joyport/joystick.h
===================================================================
--- branches/compyx/joymap-001/vice/src/joyport/joystick.h 2025-03-09 14:29:02 UTC (rev 45517)
+++ branches/compyx/joymap-001/vice/src/joyport/joystick.h 2025-03-10 10:14:46 UTC (rev 45518)
@@ -348,7 +348,7 @@
void linux_joystick_init(void);
void linux_joystick_evdev_init(void);
-void usb_joystick_init(void);
+void bsd_joystick_init(void);
void joy_hidlib_init(void);
void joy_hidlib_exit(void);
int win32_directinput_joystick_init(void);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-03-09 14:29:10
|
Revision: 45517
http://sourceforge.net/p/vice-emu/code/45517
Author: compyx
Date: 2025-03-09 14:29:02 +0000 (Sun, 09 Mar 2025)
Log Message:
-----------
Joystick: remove last remnant of old driver reference, update documentation
Remove driver reference in joystick objects, calls go directly through the
single global driver reference.
Properly document the `joystick_driver_t`, `joystick_device_t`, `joystick_axis_t`,
`joystick_button_t` and `joystick_hat_t` structs.
Add some TODO reminders for calibration data and support of non-on/off pots
(to support mapping axes to paddles and pointing/drawing devices).
Modified Paths:
--------------
branches/compyx/joymap-001/vice/src/arch/gtk3/joystickdrv/joystick_linux_evdev.c
branches/compyx/joymap-001/vice/src/joyport/joystick.c
branches/compyx/joymap-001/vice/src/joyport/joystick.h
Modified: branches/compyx/joymap-001/vice/src/arch/gtk3/joystickdrv/joystick_linux_evdev.c
===================================================================
--- branches/compyx/joymap-001/vice/src/arch/gtk3/joystickdrv/joystick_linux_evdev.c 2025-03-09 13:12:37 UTC (rev 45516)
+++ branches/compyx/joymap-001/vice/src/arch/gtk3/joystickdrv/joystick_linux_evdev.c 2025-03-09 14:29:02 UTC (rev 45517)
@@ -554,7 +554,6 @@
joydev->name, joydev->num_axes, joydev->num_buttons);
joystick_device_free(joydev);
} else {
- joydev->driver = &driver;
log_message(joy_evdev_log,
"Adding device: %s [%04x:%04x] (%d axes, %d buttons)",
joydev->name,
Modified: branches/compyx/joymap-001/vice/src/joyport/joystick.c
===================================================================
--- branches/compyx/joymap-001/vice/src/joyport/joystick.c 2025-03-09 13:12:37 UTC (rev 45516)
+++ branches/compyx/joymap-001/vice/src/joyport/joystick.c 2025-03-09 14:29:02 UTC (rev 45517)
@@ -3204,7 +3204,7 @@
{
int i;
for (i = 0; i < num_joystick_devices; i++) {
- joystick_devices[i]->driver->poll(i, joystick_devices[i]);
+ joy_driver.poll(i, joystick_devices[i]);
}
}
Modified: branches/compyx/joymap-001/vice/src/joyport/joystick.h
===================================================================
--- branches/compyx/joymap-001/vice/src/joyport/joystick.h 2025-03-09 13:12:37 UTC (rev 45516)
+++ branches/compyx/joymap-001/vice/src/joyport/joystick.h 2025-03-09 14:29:02 UTC (rev 45517)
@@ -1,11 +1,12 @@
-/*
- * joystick.h - Common joystick emulation.
+/** \file joystick.h
+ * \brief Common joystick emulation.
*
- * Written by
- * Andreas Boose <vic...@t-...>
- * Marco van den Heuvel <bla...@ya...>
- *
- * This file is part of VICE, the Versatile Commodore Emulator.
+ * \author Andreas Boose <vic...@t-...>
+ * \author Marco van den Heuvel <bla...@ya...>
+ * \author Bas Wassink <b.w...@zi...>
+ */
+
+/* This file is part of VICE, the Versatile Commodore Emulator.
* See README for copyright notice.
*
* This program is free software; you can redistribute it and/or modify
@@ -105,11 +106,12 @@
*/
#define JOYDEV_NAME_SIZE 0x80
-
+/** \brief Digital axis values
+ */
typedef enum joystick_axis_value_e {
- JOY_AXIS_NEGATIVE = -1,
- JOY_AXIS_MIDDLE = 0,
- JOY_AXIS_POSITIVE = 1
+ JOY_AXIS_NEGATIVE = -1, /**< negative direction (usually up or left) */
+ JOY_AXIS_MIDDLE = 0, /**< middle, centered position */
+ JOY_AXIS_POSITIVE = 1 /**< positive direction (usually down or right) */
} joystick_axis_value_t;
/** \brief Hat direction joystick input index values
@@ -157,6 +159,7 @@
JOY_INPUT_MAX = JOY_INPUT_BALL
} joystick_input_t;
+
/* Input mapping for each direction/button/etc */
typedef struct joystick_mapping_s {
/* Action to perform */
@@ -172,38 +175,23 @@
} joystick_mapping_t;
-typedef struct joystick_axis_mapping_s {
- /* Previous state of input */
- uint8_t prev;
- struct joystick_mapping_s positive_direction;
- struct joystick_mapping_s negative_direction;
- uint8_t pot;
-} joystick_axis_mapping_t;
-
-typedef struct joystick_button_mapping_s {
- /* Previous state of input */
- uint8_t prev;
- struct joystick_mapping_s mapping;
-} joystick_button_mapping_t;
-
-typedef struct joystick_hat_mapping_s {
- /* Previous state of input */
- uint8_t prev;
- struct joystick_mapping_s up;
- struct joystick_mapping_s down;
- struct joystick_mapping_s left;
- struct joystick_mapping_s right;
-} joystick_hat_mapping_t;
-
-
+/** \brief Joystick button object
+ *
+ * Information on a host device button input.
+ */
typedef struct joystick_button_s {
- uint16_t code;
- char *name;
- int32_t prev;
- joystick_mapping_t mapping;
+ uint16_t code; /**< event code */
+ char *name; /**< button name */
+ int32_t prev; /**< previous polled value */
+ joystick_mapping_t mapping; /**< button mapping */
/* TODO: add calibration data struct */
} joystick_button_t;
+
+/** \brief Joystick axis object
+ *
+ * Information on a host device axis input.
+ */
typedef struct joystick_axis_s {
uint16_t code; /**< axis event code */
char *name; /**< axis name */
@@ -214,76 +202,122 @@
bool digital; /**< axis is digital (reports -1, 0, 1) */
struct {
- joystick_mapping_t negative;
- joystick_mapping_t positive;
- unsigned int pot;
- } mapping;
+ joystick_mapping_t negative; /**< negative direction */
+ joystick_mapping_t positive; /**< positive direction */
+ unsigned int pot; /**< pot index (0 or 1) */
+ } mapping; /**< mapping for negative and positive directions, and
+ pot. TODO: support pot values other than on/off so
+ emulated paddles and mice can be mapped to axes. */
+ /* TODO: add calibration data */
+
} joystick_axis_t;
+
+/** \brief Joystick hat object
+ *
+ * Information on a host device hat input.
+ */
typedef struct joystick_hat_s {
- uint16_t code;
- char *name;
- int32_t prev;
+ uint16_t code; /**< hat event code */
+ char *name; /**< hat name */
+ int32_t prev; /**< previous polled value */
struct {
- joystick_mapping_t up;
- joystick_mapping_t down;
- joystick_mapping_t left;
- joystick_mapping_t right;
- } mapping;
+ joystick_mapping_t up; /**< mapping for 'up' direction */
+ joystick_mapping_t down; /**< mapping for 'down' direction */
+ joystick_mapping_t left; /**< mapping for 'left' direction */
+ joystick_mapping_t right; /**< mapping for 'right' direction */
+ } mapping; /**< mappings per direction */
} joystick_hat_t;
-/* device structure */
+/** \brief Joystick device object
+ *
+ * Contains all information on a host joystick device.
+ */
typedef struct joystick_device_s {
- /* to be removed */
- struct joystick_driver_s *driver;
-#if 0
- joystick_axis_mapping_t *axis_mapping;
- joystick_button_mapping_t *button_mapping;
- joystick_hat_mapping_t *hat_mapping;
-#endif
+ /** \brief Device name ("<vendor-name> <product-name>") */
+ char *name;
- char *name;
+ /** \brief Arch-specific device identifier
+ *
+ * Path or UUID use to identify the device for the driver's \c open()
+ * method to (re)open the device for use.
+ * For example on Linux this will be a "file" in the <tt>/dev/input/</tt>
+ * directory.
+ */
char *node;
+
+ /** \brief HID vendor ID */
uint16_t vendor;
+
+ /** \brief HID product ID */
uint16_t product;
- /* these array elements contain names, codes, capabilities and mappings */
+ /** \brief List of axes */
joystick_axis_t *axes;
+
+ /** \brief List of buttons */
joystick_button_t *buttons;
+
+ /** \brief List of hats */
joystick_hat_t *hats;
+ /** \brief Number of axes */
int num_axes;
- int num_hats;
+
+ /** \brief Number of buttons */
int num_buttons;
+ /** \brief Number of hats */
+ int num_hats;
+
/* bookkeeping for resizing arrays when adding elements */
- size_t max_axes;
- size_t max_buttons;
- size_t max_hats;
+ size_t max_axes; /**< size of \c axes array */
+ size_t max_buttons; /**< size of \c buttons array */
+ size_t max_hats; /**< size of \c hats array */
+ /** \brief Emulated machine's joystick port associated with host device */
int joyport;
+
+ /** \brief Private arch-specific data
+ *
+ * An arch-specific driver can store data here that cannot be portably
+ * contained in the core joystick data. This pointer will be passed to the
+ * driver's \c priv_free() method (if that method reference is non-NULL) on
+ * calling \c joystick_device_free().
+ *
+ * For example: the Linux driver stores a \c joy_priv_t object here that
+ * contains a file descriptor and a \c struct libevdev instance.
+ */
void *priv;
} joystick_device_t;
+/** \brief Host joystick driver object
+ *
+ * Methods to be called by the VICE core joystick code to open, poll and close
+ * devices, and to clean up on detaching/shutdown.
+ *
+ * The arch-specific code is required to call \c joystick_driver_register() to
+ * register itself on emulator startup. (TODO: maybe have the core code request
+ * this somehow?).
+ */
typedef struct joystick_driver_s {
- bool (*open)(int, joystick_device_t *);
- void (*poll)(int, joystick_device_t *);
- void (*close)(joystick_device_t *);
+ /** \brief Open host device for specific machine port */
+ bool (*open) (int, joystick_device_t *);
+
+ /** \brief Poll host device for specific machine port */
+ void (*poll) (int, joystick_device_t *);
+
+ /** \brief Close host device */
+ void (*close) (joystick_device_t *);
+
+ /** \brief Optional method to free arch-specific device data */
void (*priv_free)(void *);
} joystick_driver_t;
-void register_joystick_driver(
- struct joystick_driver_s *driver,
- const char *jname,
- void *priv,
- int num_axes,
- int num_buttons,
- int num_hats);
-
int joystick_init(void);
int joystick_resources_init(void);
int joystick_cmdline_options_init(void);
@@ -358,7 +392,7 @@
#endif
-void joystick_driver_register(const joystick_driver_t *driver);
+void joystick_driver_register (const joystick_driver_t *driver);
joystick_device_t *joystick_device_new (void);
void joystick_device_free (joystick_device_t *joydev);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-03-09 13:12:43
|
Revision: 45516
http://sourceforge.net/p/vice-emu/code/45516
Author: compyx
Date: 2025-03-09 13:12:37 +0000 (Sun, 09 Mar 2025)
Log Message:
-----------
Joystick: Major rewrite of driver and device handling
Restructure `joystick_device_t`: add `joystick_axis_t`, `joystick_button_t` and
joystick_hat_t` arrays that contain data on indivual inputs, like name, event
code and limits; mappings (`joystick_mapping_t` are now contained within the
axis, button and hat structures. Calibration data will be added to the input
structs at a later time.
Register a single driver instead of having each device have its own driver
reference (which was the same for all drivers on any given OS/UI combination).
Add `open()` method to driver to allow (re)opening a device for input, and make
the `close()` method actually close the device without freeing all resources
associated with it, so reopening can work.
Add `joystick_device_free()` to actually free resources associated with a device:
used on shutdown and to be used on unplugging (if we ever add plug-n-play).
An additional `free_priv()` callback is added to the driver which will be called
to free arch-specific device data -- if required -- called from
`joystick_device_free()`.
Linux/Gtk3 only for now: the SDL, Windows, FreeBSD and NetBSD drivers will be
updated to work with the rewritten code next.
Modified Paths:
--------------
branches/compyx/joymap-001/vice/src/arch/gtk3/joystickdrv/joystick_linux_evdev.c
branches/compyx/joymap-001/vice/src/joyport/joystick.c
branches/compyx/joymap-001/vice/src/joyport/joystick.h
Modified: branches/compyx/joymap-001/vice/src/arch/gtk3/joystickdrv/joystick_linux_evdev.c
===================================================================
--- branches/compyx/joymap-001/vice/src/arch/gtk3/joystickdrv/joystick_linux_evdev.c 2025-03-05 17:05:34 UTC (rev 45515)
+++ branches/compyx/joymap-001/vice/src/arch/gtk3/joystickdrv/joystick_linux_evdev.c 2025-03-09 13:12:37 UTC (rev 45516)
@@ -97,16 +97,18 @@
* always reported in the INT16_MIN to INT16_MAX range.
*/
typedef struct joy_priv_s {
+ struct libevdev *evdev; /**< evdev instance */
+ int fd; /**< file descriptor */
+#if 0
char *name; /**< device name */
- struct libevdev *evdev; /**< evdev instance */
uint16_t vendor; /**< vendor ID */
uint16_t product; /**< product ID */
uint16_t version; /**< product version */
- int fd; /**< file descriptor */
uint32_t num_axes; /**< number of axes */
uint32_t num_buttons; /**< number of buttons */
joy_axis_t axes[NUM_AXES_MAX]; /**< list of axes */
uint16_t buttons[NUM_BUTTONS_MAX]; /**< list of buttons */
+#endif
} joy_priv_t;
@@ -114,6 +116,7 @@
static log_t joy_evdev_log;
+#if 0
/** \brief Initialize joystick axis data
*
* \param[in] axis joystick axis data
@@ -124,6 +127,7 @@
axis->minimum = INT16_MIN;
axis->maximum = INT16_MAX;
}
+#endif
/** \brief Get index of axis event code
*
@@ -132,18 +136,18 @@
*
* \return index in axes array or -1 when not found
*/
-static int32_t joy_axis_index(joy_priv_t *priv, uint16_t code)
+static int joy_axis_index(joystick_device_t *joydev, uint16_t code)
{
- uint32_t i;
+ int i;
/* ABS_X (AXIS_CODE_MIN) is 0 and comparing unsigned for < 0 is alway false */
if (code > AXIS_CODE_MAX) {
return -1;
}
- for (i = 0; i < priv->num_axes; i++) {
- if (priv->axes[i].code == code) {
- return (int32_t)i;
- } else if (priv->axes[i].code > code) {
+ for (i = 0; i < joydev->num_axes; i++) {
+ if (joydev->axes[i].code == code) {
+ return i;
+ } else if (joydev->axes[i].code > code) {
return -1; /* axis codes are stored in order */
}
}
@@ -157,17 +161,17 @@
*
* \return index in buttons array or -1 when not found
*/
-static int32_t joy_button_index(joy_priv_t *priv, uint16_t code)
+static int joy_button_index(joystick_device_t *joydev, uint16_t code)
{
- uint32_t i;
+ int i;
if (code < BUTTON_CODE_MIN || code > BUTTON_CODE_MAX) {
return -1;
}
- for (i = 0; i < priv->num_buttons; i++) {
- if (priv->buttons[i] == code) {
- return (int32_t)i;
- } else if (priv->buttons[i] > code) {
+ for (i = 0; i < joydev->num_buttons; i++) {
+ if (joydev->buttons[i].code == code) {
+ return i;
+ } else if (joydev->buttons[i].code > code) {
return -1; /* button codes are stored in order */
}
}
@@ -181,20 +185,10 @@
static joy_priv_t *joy_priv_new(void)
{
joy_priv_t *priv;
- size_t i;
priv = lib_malloc(sizeof *priv);
- priv->name = NULL;
- priv->evdev = NULL;
- priv->fd = -1;
- priv->num_axes = 0;
- priv->num_buttons = 0;
- for (i = 0; i < ARRAY_LEN(priv->buttons); i++) {
- priv->buttons[i] = 0;
- }
- for (i = 0; i < ARRAY_LEN(priv->axes); i++) {
- joy_axis_init(&(priv->axes[i]));
- }
+ priv->fd = -1;
+ priv->evdev = NULL;
return priv;
}
@@ -205,13 +199,14 @@
*
* \param[in] priv driver-specific joystick data
*/
-static void joy_priv_free(joy_priv_t *priv)
+static void joy_priv_free(void *priv)
{
if (priv != NULL) {
- lib_free(priv->name);
- libevdev_free(priv->evdev);
- close(priv->fd);
- lib_free(priv);
+ joy_priv_t *p = priv;
+
+ libevdev_free(p->evdev);
+ close(p->fd);
+ lib_free(p);
}
}
@@ -218,20 +213,22 @@
/** \brief Dispatcher for joystick events
*
* \param[in] joyport joystick port index
- * \param[in] priv driver-specific joystick data
+ * \param[in] joydev joystick device instance
* \param[in] event event data
*/
-static void dispatch_event(int joyport, joy_priv_t *priv, struct input_event *event)
+static void dispatch_event(int joyport,
+ joystick_device_t *joydev,
+ struct input_event *event)
{
- int32_t index;
+ int index;
if (event->type == EV_KEY) {
-#if 0
+
printf("button %02x (%s): %d\n",
event->code, libevdev_event_code_get_name(EV_KEY, event->code),
event->value);
-#endif
- index = joy_button_index(priv, event->code);
+
+ index = joy_button_index(joydev, event->code);
if (index >= 0) {
joy_button_event((uint8_t)joyport, (uint8_t)index, (uint8_t)event->value);
}
@@ -241,10 +238,10 @@
event->code, libevdev_event_code_get_name(EV_ABS, event->code),
event->value);
#endif
- index = joy_axis_index(priv, event->code);
+ index = joy_axis_index(joydev, event->code);
if (index >= 0) {
- int32_t minimum = priv->axes[index].minimum;
- int32_t maximum = priv->axes[index].maximum;
+ int32_t minimum = joydev->axes[index].minimum;
+ int32_t maximum = joydev->axes[index].maximum;
int32_t range = maximum - minimum + 1;
joystick_axis_value_t direction = JOY_AXIS_MIDDLE;
@@ -265,18 +262,51 @@
}
}
+static bool linux_joystick_evdev_open(int joyport, joystick_device_t *joydev)
+{
+ struct libevdev *evdev;
+ joy_priv_t *priv;
+ int fd;
+ int rc;
+
+ if (joydev == NULL || joydev->node == NULL) {
+ return false;
+ }
+
+ fd = open(joydev->node, O_RDONLY|O_NONBLOCK);
+ if (fd < 0) {
+ return false;
+ }
+
+ /* get evdev instance from file descriptor */
+ rc = libevdev_new_from_fd(fd, &evdev);
+ if (rc < 0) {
+ log_error(LOG_DEFAULT, "failed to initialize libevdev: %s", strerror(rc));
+ close(fd);
+ return false;
+ }
+
+ priv = joydev->priv;
+ priv->fd = fd;
+ priv->evdev = evdev;
+
+ return true;
+}
+
/** \brief Poll callback for the joystick system
*
* \param[in] joyport joystick port index
* \param[in] priv driver-specific joystick data
*/
-static void linux_joystick_evdev_poll(int joyport, void *priv)
+static void linux_joystick_evdev_poll(int joyport, joystick_device_t *joydev)
{
struct libevdev *evdev;
+ joy_priv_t *priv;
int rc;
unsigned int flags = LIBEVDEV_READ_FLAG_NORMAL;
- evdev = ((joy_priv_t *)priv)->evdev;
+ priv = joydev->priv;
+ evdev = priv->evdev;
while (libevdev_has_event_pending(evdev)) {
struct input_event event;
@@ -288,7 +318,7 @@
}
} else if (rc == LIBEVDEV_READ_STATUS_SUCCESS) {
if (event.type == EV_ABS || event.type == EV_KEY) {
- dispatch_event(joyport, priv, &event);
+ dispatch_event(joyport, joydev, &event);
}
}
}
@@ -300,9 +330,16 @@
*
* \param[in] priv driver-specific joystick data
*/
-static void linux_joystick_evdev_close(void *priv)
+static void linux_joystick_evdev_close(joystick_device_t *joydev)
{
- joy_priv_free(priv);
+ if (joydev != NULL && joydev->priv != NULL) {
+ joy_priv_t *priv = joydev->priv;
+
+ close(priv->fd);
+ libevdev_free(priv->evdev);
+ priv->fd = -1;
+ priv->evdev = NULL;
+ }
}
/** \brief Filter callback for scandir(3)
@@ -325,10 +362,10 @@
/** \brief Scan device for available buttons
*
- * \param[in] priv joystick private data
+ * \param[in] joydev joystick device instance
* \param[in] evdev libevdev instance
*/
-static void scan_buttons(joy_priv_t *priv, struct libevdev *evdev)
+static void scan_buttons(joystick_device_t *joydev, struct libevdev *evdev)
{
if (libevdev_has_event_type(evdev, EV_KEY)) {
unsigned int code;
@@ -335,7 +372,14 @@
for (code = BUTTON_CODE_MIN; code <= BUTTON_CODE_MAX; code++) {
if (libevdev_has_event_code(evdev, EV_KEY, code)) {
- priv->buttons[priv->num_buttons++] = (uint16_t)code;
+ joystick_button_t button;
+
+ joystick_button_init(&button);
+ button.code = (uint16_t)code;
+ /* need to copy since event_code_get_name() returns const char* */
+ button.name = lib_strdup(libevdev_event_code_get_name(EV_KEY, code));
+ joystick_device_add_button(joydev, &button);
+ lib_free(button.name);
}
}
}
@@ -343,10 +387,10 @@
/** \brief Scan device for available axes
*
- * \param[in] priv joystick private data
+ * \param[in] joydev joystick device instance
* \param[in] evdev libevdev instance
*/
-static void scan_axes(joy_priv_t *priv, struct libevdev *evdev)
+static void scan_axes(joystick_device_t *joydev, struct libevdev *evdev)
{
if (libevdev_has_event_type(evdev, EV_ABS)) {
unsigned int code;
@@ -354,20 +398,24 @@
for (code = AXIS_CODE_MIN; code <= AXIS_CODE_MAX; code++) {
if (libevdev_has_event_code(evdev, EV_ABS, code)) {
const struct input_absinfo *info;
- joy_axis_t *axis;
+ joystick_axis_t axis;
info = libevdev_get_abs_info(evdev, code);
- axis = &(priv->axes[priv->num_axes++]);
- axis->code = (uint16_t)code;
+ joystick_axis_init(&axis);
+ axis.code = (uint16_t)code;
+ axis.name = lib_strdup(libevdev_event_code_get_name(EV_ABS, code));
if (info != NULL) {
- axis->minimum = info->minimum;
- axis->maximum = info->maximum;
+ axis.minimum = info->minimum;
+ axis.maximum = info->maximum;
}
+ joystick_device_add_axis(joydev, &axis);
+ lib_free(axis.name);
}
}
}
}
+#if 0
/** \brief Scan possible joystick device for capabilities
*
* Try to open \a node and process with libevdev to determine its capabilities.
@@ -414,8 +462,50 @@
return priv;
}
+#endif
+static joystick_device_t *scan_device(const char *node)
+{
+ joystick_device_t *joydev;
+ struct libevdev *evdev;
+ joy_priv_t *priv;
+ char path[256];
+ int fd;
+ int rc;
+ snprintf(path, sizeof path, "/dev/input/%s", node);
+ fd = open(path, O_RDONLY|O_NONBLOCK);
+ if (fd < 0) {
+ return NULL;
+ }
+
+ /* get evdev instance from file descriptor */
+ rc = libevdev_new_from_fd(fd, &evdev);
+ if (rc < 0) {
+ log_error(LOG_DEFAULT, "failed to initialize libevdev: %s", strerror(rc));
+ close(fd);
+ return NULL;
+ }
+
+ /* create new joystick device instance and add data */
+ joydev = joystick_device_new();
+ joydev->name = lib_strdup(libevdev_get_name(evdev));
+ joydev->node = lib_strdup(path);
+ joydev->vendor = (uint16_t)libevdev_get_id_vendor(evdev);
+ joydev->product = (uint16_t)libevdev_get_id_product(evdev);
+
+ priv = joy_priv_new();
+ priv->fd = fd; /* TODO: remove once open() is implemented */
+ priv->evdev = evdev; /* TODO: remove once open() is implemented */
+ joydev->priv = priv;
+
+ /* scan for valid inputs */
+ scan_buttons(joydev, evdev);
+ scan_axes(joydev, evdev);
+ return joydev;
+}
+
+
/** \brief Object used to register driver for devices
*
* The address of this object is used in the joystick code, it isn't copied,
@@ -422,8 +512,10 @@
* so we cannot move this into `linux_joystick_init()` to use for registration.
*/
static joystick_driver_t driver = {
+ .open = linux_joystick_evdev_open,
.poll = linux_joystick_evdev_poll,
- .close = linux_joystick_evdev_close
+ .close = linux_joystick_evdev_close,
+ .priv_free = joy_priv_free
};
@@ -441,6 +533,7 @@
joy_evdev_log = log_open("evdev Joystick");
log_message(joy_evdev_log, "Initializing Linux evdev joystick driver.");
+ joystick_driver_register(&driver);
sd_result = scandir("/dev/input", &namelist, sd_filter, alphasort);
if (sd_result < 0) {
@@ -449,32 +542,32 @@
}
for (i = 0; i < sd_result; i++) {
- joy_priv_t *priv;
+ joystick_device_t *joydev;
- //log_message(joy_evdev_log, "Possible device '%s'", namelist[i]->d_name);
- priv = scan_device(namelist[i]->d_name);
- if (priv != NULL) {
- if (priv->num_axes < 2u || priv->num_buttons < 1u) {
+ log_message(joy_evdev_log, "Possible device '%s'", namelist[i]->d_name);
+ joydev = scan_device(namelist[i]->d_name);
+ if (joydev != NULL) {
+ if (joydev->num_axes < 2u || joydev->num_buttons < 1u) {
/* reject device */
log_message(joy_evdev_log,
- "Invalid geometry for %s: axes: %u, buttons: %u",
- priv->name,
- (unsigned int)priv->num_axes,
- (unsigned int)priv->num_buttons);
- joy_priv_free(priv);
+ "Invalid geometry for %s: axes: %d, buttons: %d",
+ joydev->name, joydev->num_axes, joydev->num_buttons);
+ joystick_device_free(joydev);
} else {
-#if 0
+ joydev->driver = &driver;
log_message(joy_evdev_log,
- "Adding device: %s [%04x:%04x] (%u axes, %u buttons)",
- priv->name,
- (unsigned int)priv->vendor, (unsigned int)priv->product,
- (unsigned int)priv->num_axes, (unsigned int)priv->num_buttons);
- joy_priv_free(priv);
-#endif
- register_joystick_driver(&driver, priv->name, priv, priv->num_axes, priv->num_buttons, 0);
+ "Adding device: %s [%04x:%04x] (%d axes, %d buttons)",
+ joydev->name,
+ (unsigned int)joydev->vendor, (unsigned int)joydev->product,
+ joydev->num_axes, joydev->num_buttons);
+
+ if (!joystick_device_register(joydev)) {
+ log_message(joy_evdev_log,
+ "Failed to add device, continuing with next device.");
+ joystick_device_free(joydev);
+ }
}
}
- free(namelist[i]);
}
free(namelist);
}
Modified: branches/compyx/joymap-001/vice/src/joyport/joystick.c
===================================================================
--- branches/compyx/joymap-001/vice/src/joyport/joystick.c 2025-03-05 17:05:34 UTC (rev 45515)
+++ branches/compyx/joymap-001/vice/src/joyport/joystick.c 2025-03-09 13:12:37 UTC (rev 45516)
@@ -35,6 +35,9 @@
#include <stdlib.h>
#include <string.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <assert.h>
#include "archdep.h"
#include "alarm.h"
@@ -172,6 +175,15 @@
static char *joymap_factory = NULL;
+static joystick_driver_t joy_driver = {
+ .open = NULL,
+ .poll = NULL,
+ .close = NULL,
+ .priv_free = NULL
+};
+
+
+
static log_t joy_log = LOG_DEFAULT;
static void joystick_latch_matrix(CLOCK offset)
@@ -801,52 +813,13 @@
return 0;
}
-typedef struct joystick_axis_mapping_s {
- /* Previous state of input */
- uint8_t prev;
- struct joystick_mapping_s positive_direction;
- struct joystick_mapping_s negative_direction;
- uint8_t pot;
-} joystick_axis_mapping_t;
-typedef struct joystick_button_mapping_s {
- /* Previous state of input */
- uint8_t prev;
- struct joystick_mapping_s mapping;
-} joystick_button_mapping_t;
-typedef struct joystick_hat_mapping_s {
- /* Previous state of input */
- uint8_t prev;
- struct joystick_mapping_s up;
- struct joystick_mapping_s down;
- struct joystick_mapping_s left;
- struct joystick_mapping_s right;
-} joystick_hat_mapping_t;
+static size_t num_joystick_devices = 0;
+static size_t max_joystick_devices = 0;
+static joystick_device_t **joystick_devices = NULL;
-static int num_joystick_devices = 0;
-/** \brief Joystick device name length (including 0)
- */
-#define JOYDEV_NAME_SIZE 0x80
-
-/* device structure */
-typedef struct joystick_device_s {
- struct joystick_driver_s *driver;
- char jname[JOYDEV_NAME_SIZE];
- int joyport;
- void *priv;
- joystick_axis_mapping_t *axis_mapping;
- joystick_button_mapping_t *button_mapping;
- joystick_hat_mapping_t *hat_mapping;
- int num_axes;
- int num_hats;
- int num_buttons;
-} joystick_device_t;
-
-
-static struct joystick_device_s *joystick_devices = NULL;
-
static int set_joystick_device(int val, void *param)
{
int port_idx = vice_ptr_to_int(param);
@@ -854,7 +827,7 @@
if (joystick_port_map[port_idx] >= JOYDEV_REALJOYSTICK_MIN) {
int olddev = joystick_port_map[port_idx] - JOYDEV_REALJOYSTICK_MIN;
if (olddev < num_joystick_devices) {
- joystick_devices[olddev].joyport = -1;
+ joystick_devices[olddev]->joyport = -1;
}
}
@@ -863,7 +836,7 @@
if (joystick_port_map[port_idx] >= JOYDEV_REALJOYSTICK_MIN) {
int newdev = joystick_port_map[port_idx] - JOYDEV_REALJOYSTICK_MIN;
if (newdev < num_joystick_devices) {
- joystick_devices[newdev].joyport = port_idx;
+ joystick_devices[newdev]->joyport = port_idx;
int i;
for (i = 0; i < JOYPORT_MAX_PORTS; i++) {
if (i != port_idx && joystick_port_map[port_idx] == joystick_port_map[i]) {
@@ -876,12 +849,15 @@
return 0;
}
-void joystick_set_axis_value(unsigned int joynum, unsigned int axis, uint8_t value)
+void joystick_set_axis_value(unsigned int joynum, unsigned int axis_idx, uint8_t value)
{
- if (joynum < num_joystick_devices
- && (joystick_devices[joynum].joyport == 0 || joystick_devices[joynum].joyport == 1)
- && joystick_devices[joynum].axis_mapping[axis].pot > 0) {
- joystick_axis_value[joystick_devices[joynum].joyport][joystick_devices[joynum].axis_mapping[axis].pot - 1] = value;
+ if (joynum < num_joystick_devices) {
+ joystick_device_t *joydev = joystick_devices[joynum];
+ joystick_axis_t *axis = &joydev->axes[axis_idx];
+
+ if ((joydev->joyport == 0 || joydev->joyport == 1) && (axis->mapping.pot > 0)) {
+ joystick_axis_value[joydev->joyport][axis->mapping.pot- 1] = value;
+ }
}
}
@@ -893,9 +869,9 @@
char *retval = NULL;
if (joystick_device_num >= 0 && joystick_device_num < num_joystick_devices) {
- for (j = 0; j < joystick_devices[joystick_device_num].num_axes; j++) {
- if (joystick_devices[joystick_device_num].axis_mapping[j].pot - 1 == pot) {
- snprintf(mapping_retval, 50, "Ax%d", j);
+ for (j = 0; j < joystick_devices[joystick_device_num]->num_axes; j++) {
+ if (joystick_devices[joystick_device_num]->axes[j].mapping.pot - 1 == pot) {
+ snprintf(mapping_retval, sizeof mapping_retval, "Ax%d", j);
retval = mapping_retval;
}
}
@@ -906,7 +882,6 @@
char *get_joy_pin_mapping_string(int joystick_device_num, int pin)
{
int j;
- joystick_action_t t;
int valid = 0;
int index = 0;
int sub_index = 0;
@@ -915,79 +890,92 @@
char *index_string = NULL;
if (joystick_device_num >= 0 && joystick_device_num < num_joystick_devices) {
- for (j = 0; j < joystick_devices[joystick_device_num].num_axes; j++) {
- t = joystick_devices[joystick_device_num].axis_mapping[j].positive_direction.action;
- if (t == JOY_ACTION_JOYSTICK && joystick_devices[joystick_device_num].axis_mapping[j].positive_direction.value.joy_pin == pin) {
+ for (j = 0; j < joystick_devices[joystick_device_num]->num_axes; j++) {
+ joystick_mapping_t *positive;
+ joystick_mapping_t *negative;
+ joystick_axis_t *axis = &joystick_devices[joystick_device_num]->axes[j];
+
+ positive = &axis->mapping.positive;
+ if (positive->action == JOY_ACTION_JOYSTICK && positive->value.joy_pin == pin) {
valid++;
- type_string = "Ax";
+ type_string = "Ax";
index_string = "I";
- index = j;
- sub_index = 0;
+ index = j;
+ sub_index = 0;
}
- t = joystick_devices[joystick_device_num].axis_mapping[j].negative_direction.action;
- if (t == JOY_ACTION_JOYSTICK && joystick_devices[joystick_device_num].axis_mapping[j].negative_direction.value.joy_pin == pin) {
+
+ negative = &axis->mapping.negative;
+ if (negative->action == JOY_ACTION_JOYSTICK && negative->value.joy_pin == pin) {
valid++;
- type_string = "Ax";
+ type_string = "Ax";
index_string = "I";
- index = j;
- sub_index = 1;
+ index = j;
+ sub_index = 1;
}
}
- for (j = 0; j < joystick_devices[joystick_device_num].num_buttons; j++) {
- t = joystick_devices[joystick_device_num].button_mapping[j].mapping.action;
- if (t == JOY_ACTION_JOYSTICK) {
- if (joystick_devices[joystick_device_num].button_mapping[j].mapping.value.joy_pin == pin) {
+
+ for (j = 0; j < joystick_devices[joystick_device_num]->num_buttons; j++) {
+ joystick_button_t *button = &joystick_devices[joystick_device_num]->buttons[j];
+ joystick_mapping_t *mapping = &button->mapping;
+ if (mapping->action == JOY_ACTION_JOYSTICK) {
+ if (mapping->value.joy_pin == pin) {
valid++;
- type_string = "Bt";
+ type_string = "Bt";
index_string = NULL;
- index = j;
- sub_index = 0;
+ index = j;
+ sub_index = 0;
}
}
}
- for (j = 0; j < joystick_devices[joystick_device_num].num_hats; j++) {
- t = joystick_devices[joystick_device_num].hat_mapping[j].up.action;
- if (t == JOY_ACTION_JOYSTICK) {
- if (joystick_devices[joystick_device_num].hat_mapping[j].up.value.joy_pin == pin) {
+ for (j = 0; j < joystick_devices[joystick_device_num]->num_hats; j++) {
+ joystick_mapping_t *up;
+ joystick_mapping_t *down;
+ joystick_mapping_t *left;
+ joystick_mapping_t *right;
+ joystick_hat_t *hat = &joystick_devices[joystick_device_num]->hats[j];
+
+ up = &hat->mapping.up;
+ if (up->action == JOY_ACTION_JOYSTICK) {
+ if (up->value.joy_pin == pin) {
valid++;
- type_string = "Ht";
+ type_string = "Ht";
index_string = "I";
- index = j;
- sub_index = 0;
+ index = j;
+ sub_index = 0;
}
}
- t = joystick_devices[joystick_device_num].hat_mapping[j].down.action;
- if (t == JOY_ACTION_JOYSTICK) {
- if (joystick_devices[joystick_device_num].hat_mapping[j].down.value.joy_pin == pin) {
+ down = &hat->mapping.down;
+ if (down->action == JOY_ACTION_JOYSTICK) {
+ if (down->value.joy_pin == pin) {
valid++;
- type_string = "Ht";
+ type_string = "Ht";
index_string = "I";
- index = j;
- sub_index = 1;
+ index = j;
+ sub_index = 1;
}
}
- t = joystick_devices[joystick_device_num].hat_mapping[j].left.action;
- if (t == JOY_ACTION_JOYSTICK) {
- if (joystick_devices[joystick_device_num].hat_mapping[j].left.value.joy_pin == pin) {
+ left = &hat->mapping.left;
+ if (left->action == JOY_ACTION_JOYSTICK) {
+ if (left->value.joy_pin == pin) {
valid++;
- type_string = "Ht";
+ type_string = "Ht";
index_string = "I";
- index = j;
- sub_index = 2;
+ index = j;
+ sub_index = 2;
}
}
- t = joystick_devices[joystick_device_num].hat_mapping[j].right.action;
- if (t == JOY_ACTION_JOYSTICK) {
- if (joystick_devices[joystick_device_num].hat_mapping[j].right.value.joy_pin == pin) {
+ right = &hat->mapping.right;
+ if (right->action == JOY_ACTION_JOYSTICK) {
+ if (right->value.joy_pin == pin) {
valid++;
- type_string = "Ht";
+ type_string = "Ht";
index_string = "I";
- index = j;
- sub_index = 3;
+ index = j;
+ sub_index = 3;
}
}
}
@@ -997,9 +985,11 @@
}
if (valid == 1) {
if (index_string != NULL ) {
- snprintf(mapping_retval, 50, "%s%d, %s%d", type_string, index, index_string, sub_index);
+ snprintf(mapping_retval, sizeof mapping_retval,
+ "%s%d, %s%d", type_string, index, index_string, sub_index);
} else {
- snprintf(mapping_retval, 50, "%s%d", type_string, index);
+ snprintf(mapping_retval, sizeof mapping_retval,
+ "%s%d", type_string, index);
}
retval = mapping_retval;
}
@@ -1010,7 +1000,6 @@
char *get_joy_extra_mapping_string(int which)
{
int i, j;
- joystick_action_t t;
int valid = 0;
int joy = 0;
int index = 0;
@@ -1020,77 +1009,84 @@
char *index_string = NULL;
for (i = 0; i < num_joystick_devices; i++) {
- for (j = 0; j < joystick_devices[i].num_axes; j++) {
- t = joystick_devices[i].axis_mapping[j].positive_direction.action;
- if (t == (which ? JOY_ACTION_MAP : JOY_ACTION_UI_ACTIVATE)) {
+ joystick_device_t *joydev = joystick_devices[i];
+
+ for (j = 0; j < joystick_devices[i]->num_axes; j++) {
+ joystick_mapping_t *positive = &joydev->axes[j].mapping.positive;
+ joystick_mapping_t *negative = &joydev->axes[j].mapping.negative;
+
+ if (positive->action == (which ? JOY_ACTION_MAP : JOY_ACTION_UI_ACTIVATE)) {
valid++;
- joy = i;
- type_string = "Ax";
+ joy = i;
+ type_string = "Ax";
index_string = "I";
- index = j;
- sub_index = 0;
+ index = j;
+ sub_index = 0;
}
- t = joystick_devices[i].axis_mapping[j].negative_direction.action;
- if (t == (which ? JOY_ACTION_MAP : JOY_ACTION_UI_ACTIVATE)) {
+
+ if (negative->action == (which ? JOY_ACTION_MAP : JOY_ACTION_UI_ACTIVATE)) {
valid++;
- joy = i;
- type_string = "Ax";
+ joy = i;
+ type_string = "Ax";
index_string = "I";
- index = j;
- sub_index = 1;
+ index = j;
+ sub_index = 1;
}
}
- for (j = 0; j < joystick_devices[i].num_buttons; j++) {
- t = joystick_devices[i].button_mapping[j].mapping.action;
- if (t == (which ? JOY_ACTION_MAP : JOY_ACTION_UI_ACTIVATE)) {
+
+ for (j = 0; j < joystick_devices[i]->num_buttons; j++) {
+ joystick_mapping_t *mapping = &joydev->buttons[j].mapping;
+
+ if (mapping->action == (which ? JOY_ACTION_MAP : JOY_ACTION_UI_ACTIVATE)) {
valid++;
- joy = i;
- type_string = "Bt";
+ joy = i;
+ type_string = "Bt";
index_string = NULL;
- index = j;
- sub_index = 0;
+ index = j;
+ sub_index = 0;
}
}
- for (j = 0; j < joystick_devices[i].num_hats; j++) {
- t = joystick_devices[i].hat_mapping[j].up.action;
- if (t == (which ? JOY_ACTION_MAP : JOY_ACTION_UI_ACTIVATE)) {
+ for (j = 0; j < joystick_devices[i]->num_hats; j++) {
+ joystick_mapping_t *up = &joydev->hats[j].mapping.up;
+ joystick_mapping_t *down = &joydev->hats[j].mapping.down;
+ joystick_mapping_t *left = &joydev->hats[j].mapping.left;
+ joystick_mapping_t *right = &joydev->hats[j].mapping.right;
+
+ if (up->action == (which ? JOY_ACTION_MAP : JOY_ACTION_UI_ACTIVATE)) {
valid++;
- joy = i;
- type_string = "Ht";
+ joy = i;
+ type_string = "Ht";
index_string = "I";
- index = j;
- sub_index = 0;
+ index = j;
+ sub_index = 0;
}
- t = joystick_devices[i].hat_mapping[j].down.action;
- if (t == (which ? JOY_ACTION_MAP : JOY_ACTION_UI_ACTIVATE)) {
+ if (down->action == (which ? JOY_ACTION_MAP : JOY_ACTION_UI_ACTIVATE)) {
valid++;
- joy = i;
- type_string = "Ht";
+ joy = i;
+ type_string = "Ht";
index_string = "I";
- index = j;
- sub_index = 1;
+ index = j;
+ sub_index = 1;
}
- t = joystick_devices[i].hat_mapping[j].left.action;
- if (t == (which ? JOY_ACTION_MAP : JOY_ACTION_UI_ACTIVATE)) {
+ if (left->action == (which ? JOY_ACTION_MAP : JOY_ACTION_UI_ACTIVATE)) {
valid++;
- joy = i;
- type_string = "Ht";
+ joy = i;
+ type_string = "Ht";
index_string = "I";
- index = j;
- sub_index = 2;
+ index = j;
+ sub_index = 2;
}
- t = joystick_devices[i].hat_mapping[j].right.action;
- if (t == (which ? JOY_ACTION_MAP : JOY_ACTION_UI_ACTIVATE)) {
+ if (right->action == (which ? JOY_ACTION_MAP : JOY_ACTION_UI_ACTIVATE)) {
valid++;
- joy = i;
- type_string = "Ht";
+ joy = i;
+ type_string = "Ht";
index_string = "I";
- index = j;
- sub_index = 3;
+ index = j;
+ sub_index = 3;
}
}
}
@@ -1099,9 +1095,13 @@
}
if (valid == 1) {
if (index_string != NULL ) {
- snprintf(mapping_retval, 50, "J%d, %s%d, %s%d", joy, type_string, index, index_string, sub_index);
+ snprintf(mapping_retval, sizeof mapping_retval,
+ "J%d, %s%d, %s%d",
+ joy, type_string, index, index_string, sub_index);
} else {
- snprintf(mapping_retval, 50, "J%d, %s%d", joy, type_string, index);
+ snprintf(mapping_retval, sizeof mapping_retval,
+ "J%d, %s%d",
+ joy, type_string, index);
}
retval = mapping_retval;
}
@@ -1111,7 +1111,7 @@
void joy_set_pot_mapping(int joystick_device_num, int axis, int pot)
{
- joystick_devices[joystick_device_num].axis_mapping[axis].pot = pot + 1;
+ joystick_devices[joystick_device_num]->axes[axis].mapping.pot = pot + 1;
}
void joy_delete_pot_mapping(int joystick_device_num, int pot)
@@ -1119,9 +1119,12 @@
int j;
if (joystick_device_num >= 0 && joystick_device_num < num_joystick_devices) {
- for (j = 0; j < joystick_devices[joystick_device_num].num_axes; j++) {
- if (joystick_devices[joystick_device_num].axis_mapping[j].pot - 1 == pot) {
- joystick_devices[joystick_device_num].axis_mapping[j].pot = 0;
+ joystick_device_t *joydev = joystick_devices[joystick_device_num];
+
+ for (j = 0; j < joydev->num_axes; j++) {
+ joystick_axis_t *axis = &joydev->axes[j];
+ if (axis->mapping.pot - 1 == pot) {
+ axis->mapping.pot = 0;
}
}
}
@@ -1130,61 +1133,68 @@
void joy_delete_pin_mapping(int joystick_device_num, int pin)
{
int j;
- joystick_action_t t;
if (joystick_device_num >= 0 && joystick_device_num < num_joystick_devices) {
- for (j = 0; j < joystick_devices[joystick_device_num].num_axes; j++) {
- t = joystick_devices[joystick_device_num].axis_mapping[j].positive_direction.action;
- if (t == JOY_ACTION_JOYSTICK) {
- if (joystick_devices[joystick_device_num].axis_mapping[j].positive_direction.value.joy_pin == pin) {
- joystick_devices[joystick_device_num].axis_mapping[j].positive_direction.action = JOY_ACTION_NONE;
- joystick_devices[joystick_device_num].axis_mapping[j].positive_direction.value.joy_pin = 0;
+ joystick_device_t *joydev = joystick_devices[joystick_device_num];
+
+ for (j = 0; j < joydev->num_axes; j++) {
+ joystick_mapping_t *negative = &joydev->axes[j].mapping.negative;
+ joystick_mapping_t *positive = &joydev->axes[j].mapping.positive;
+
+ if (positive->action == JOY_ACTION_JOYSTICK) {
+ if (positive->value.joy_pin == pin) {
+ positive->action = JOY_ACTION_NONE;
+ positive->value.joy_pin = 0;
}
}
- t = joystick_devices[joystick_device_num].axis_mapping[j].negative_direction.action;
- if (t == JOY_ACTION_JOYSTICK) {
- if (joystick_devices[joystick_device_num].axis_mapping[j].negative_direction.value.joy_pin == pin) {
- joystick_devices[joystick_device_num].axis_mapping[j].negative_direction.action = JOY_ACTION_NONE;
- joystick_devices[joystick_device_num].axis_mapping[j].negative_direction.value.joy_pin = 0;
+
+ if (negative->action == JOY_ACTION_JOYSTICK) {
+ if (negative->value.joy_pin == pin) {
+ negative->action = JOY_ACTION_NONE;
+ negative->value.joy_pin = 0;
}
}
}
- for (j = 0; j < joystick_devices[joystick_device_num].num_buttons; j++) {
- t = joystick_devices[joystick_device_num].button_mapping[j].mapping.action;
- if (t == JOY_ACTION_JOYSTICK) {
- if (joystick_devices[joystick_device_num].button_mapping[j].mapping.value.joy_pin == pin) {
- joystick_devices[joystick_device_num].button_mapping[j].mapping.action = JOY_ACTION_NONE;
- joystick_devices[joystick_device_num].button_mapping[j].mapping.value.joy_pin = 0;
+
+ for (j = 0; j < joydev->num_buttons; j++) {
+ joystick_mapping_t *mapping = &joydev->buttons[j].mapping;
+
+ if (mapping->action == JOY_ACTION_JOYSTICK) {
+ if (mapping->value.joy_pin == pin) {
+ mapping->action = JOY_ACTION_NONE;
+ mapping->value.joy_pin = 0;
}
}
}
- for (j = 0; j < joystick_devices[joystick_device_num].num_hats; j++) {
- t = joystick_devices[joystick_device_num].hat_mapping[j].up.action;
- if (t == JOY_ACTION_JOYSTICK) {
- if (joystick_devices[joystick_device_num].hat_mapping[j].up.value.joy_pin == pin) {
- joystick_devices[joystick_device_num].hat_mapping[j].up.action = JOY_ACTION_NONE;
- joystick_devices[joystick_device_num].hat_mapping[j].up.value.joy_pin = 0;
+
+ for (j = 0; j < joydev->num_hats; j++) {
+ joystick_mapping_t *up = &joydev->hats[j].mapping.up;
+ joystick_mapping_t *down = &joydev->hats[j].mapping.down;
+ joystick_mapping_t *left = &joydev->hats[j].mapping.left;
+ joystick_mapping_t *right = &joydev->hats[j].mapping.right;
+
+ if (up->action == JOY_ACTION_JOYSTICK) {
+ if (up->value.joy_pin == pin) {
+ up->action = JOY_ACTION_NONE;
+ up->value.joy_pin = 0;
}
}
- t = joystick_devices[joystick_device_num].hat_mapping[j].down.action;
- if (t == JOY_ACTION_JOYSTICK) {
- if (joystick_devices[joystick_device_num].hat_mapping[j].down.value.joy_pin == pin) {
- joystick_devices[joystick_device_num].hat_mapping[j].down.action = JOY_ACTION_NONE;
- joystick_devices[joystick_device_num].hat_mapping[j].down.value.joy_pin = 0;
+ if (down->action == JOY_ACTION_JOYSTICK) {
+ if (down->value.joy_pin == pin) {
+ down->action = JOY_ACTION_NONE;
+ down->value.joy_pin = 0;
}
}
- t = joystick_devices[joystick_device_num].hat_mapping[j].left.action;
- if (t == JOY_ACTION_JOYSTICK) {
- if (joystick_devices[joystick_device_num].hat_mapping[j].left.value.joy_pin == pin) {
- joystick_devices[joystick_device_num].hat_mapping[j].left.action = JOY_ACTION_NONE;
- joystick_devices[joystick_device_num].hat_mapping[j].left.value.joy_pin = 0;
+ if (left->action == JOY_ACTION_JOYSTICK) {
+ if (left->value.joy_pin == pin) {
+ left->action = JOY_ACTION_NONE;
+ left->value.joy_pin = 0;
}
}
- t = joystick_devices[joystick_device_num].hat_mapping[j].right.action;
- if (t == JOY_ACTION_JOYSTICK) {
- if (joystick_devices[joystick_device_num].hat_mapping[j].right.value.joy_pin == pin) {
- joystick_devices[joystick_device_num].hat_mapping[j].right.action = JOY_ACTION_NONE;
- joystick_devices[joystick_device_num].hat_mapping[j].right.value.joy_pin = 0;
+ if (right->action == JOY_ACTION_JOYSTICK) {
+ if (right->value.joy_pin == pin) {
+ right->action = JOY_ACTION_NONE;
+ right->value.joy_pin = 0;
}
}
}
@@ -1198,45 +1208,45 @@
joystick_action_t t;
for (i = 0; i < num_joystick_devices; i++) {
- for (j = 0; j < joystick_devices[i].num_axes; j++) {
- t = joystick_devices[i].axis_mapping[j].positive_direction.action;
+ for (j = 0; j < joystick_devices[i]->num_axes; j++) {
+ t = joystick_devices[i]->axis_mapping[j].positive_direction.action;
if (t == (type ? JOY_ACTION_MAP : JOY_ACTION_UI_ACTIVATE)) {
- joystick_devices[i].axis_mapping[j].positive_direction.action = JOY_ACTION_NONE;
- joystick_devices[i].axis_mapping[j].positive_direction.value.ui_action = ACTION_NONE;
+ joystick_devices[i]->axis_mapping[j].positive_direction.action = JOY_ACTION_NONE;
+ joystick_devices[i]->axis_mapping[j].positive_direction.value.ui_action = ACTION_NONE;
}
- t = joystick_devices[i].axis_mapping[j].negative_direction.action;
+ t = joystick_devices[i]->axis_mapping[j].negative_direction.action;
if (t == (type ? JOY_ACTION_MAP : JOY_ACTION_UI_ACTIVATE)) {
- joystick_devices[i].axis_mapping[j].negative_direction.action = JOY_ACTION_NONE;
- joystick_devices[i].axis_mapping[j].negative_direction.value.ui_action = ACTION_NONE;
+ joystick_devices[i]->axis_mapping[j].negative_direction.action = JOY_ACTION_NONE;
+ joystick_devices[i]->axis_mapping[j].negative_direction.value.ui_action = ACTION_NONE;
}
}
- for (j = 0; j < joystick_devices[i].num_buttons; j++) {
- t = joystick_devices[i].button_mapping[j].mapping.action;
+ for (j = 0; j < joystick_devices[i]->num_buttons; j++) {
+ t = joystick_devices[i]->button_mapping[j].mapping.action;
if (t == (type ? JOY_ACTION_MAP : JOY_ACTION_UI_ACTIVATE)) {
- joystick_devices[i].button_mapping[j].mapping.action = JOY_ACTION_NONE;
- joystick_devices[i].button_mapping[j].mapping.value.ui_action = ACTION_NONE;
+ joystick_devices[i]->button_mapping[j].mapping.action = JOY_ACTION_NONE;
+ joystick_devices[i]->button_mapping[j].mapping.value.ui_action = ACTION_NONE;
}
}
- for (j = 0; j < joystick_devices[i].num_hats; j++) {
- t = joystick_devices[i].hat_mapping[j].up.action;
+ for (j = 0; j < joystick_devices[i]->num_hats; j++) {
+ t = joystick_devices[i]->hat_mapping[j].up.action;
if (t == (type ? JOY_ACTION_MAP : JOY_ACTION_UI_ACTIVATE)) {
- joystick_devices[i].hat_mapping[j].up.action = JOY_ACTION_NONE;
- joystick_devices[i].hat_mapping[j].up.value.ui_action = ACTION_NONE;
+ joystick_devices[i]->hat_mapping[j].up.action = JOY_ACTION_NONE;
+ joystick_devices[i]->hat_mapping[j].up.value.ui_action = ACTION_NONE;
}
- t = joystick_devices[i].hat_mapping[j].down.action;
+ t = joystick_devices[i]->hat_mapping[j].down.action;
if (t == (type ? JOY_ACTION_MAP : JOY_ACTION_UI_ACTIVATE)) {
- joystick_devices[i].hat_mapping[j].down.action = JOY_ACTION_NONE;
- joystick_devices[i].hat_mapping[j].down.value.ui_action = ACTION_NONE;
+ joystick_devices[i]->hat_mapping[j].down.action = JOY_ACTION_NONE;
+ joystick_devices[i]->hat_mapping[j].down.value.ui_action = ACTION_NONE;
}
t = joystick_devices[i].hat_mapping[j].left.action;
if (t == (type ? JOY_ACTION_MAP : JOY_ACTION_UI_ACTIVATE)) {
- joystick_devices[i].hat_mapping[j].left.action = JOY_ACTION_NONE;
- joystick_devices[i].hat_mapping[j].left.value.ui_action = ACTION_NONE;
+ joystick_devices[i]->hat_mapping[j].left.action = JOY_ACTION_NONE;
+ joystick_devices[i]->hat_mapping[j].left.value.ui_action = ACTION_NONE;
}
- t = joystick_devices[i].hat_mapping[j].right.action;
+ t = joystick_devices[i]->hat_mapping[j].right.action;
if (t == (type ? JOY_ACTION_MAP : JOY_ACTION_UI_ACTIVATE)) {
- joystick_devices[i].hat_mapping[j].right.action = JOY_ACTION_NONE;
- joystick_devices[i].hat_mapping[j].right.value.ui_action = ACTION_NONE;
+ joystick_devices[i]->hat_mapping[j].right.action = JOY_ACTION_NONE;
+ joystick_devices[i]->hat_mapping[j].right.value.ui_action = ACTION_NONE;
}
}
}
@@ -1321,7 +1331,7 @@
{
FILE *fp;
int dev_idx;
- int map_idx;
+ int inp_idx;
#ifdef SDL_DEBUG
fprintf(stderr, "%s\n", __func__);
@@ -1341,21 +1351,21 @@
fprintf(fp, "!CLEAR\n\n");
for (dev_idx = 0; dev_idx < num_joystick_devices; dev_idx++) {
- joystick_device_t *device = &joystick_devices[dev_idx];
+ joystick_device_t *joydev = joystick_devices[dev_idx];
int row = 0;
- fprintf(fp, "# %s\n", device->jname);
+ fprintf(fp, "# %s\n", joydev->name);
/* dump axis mappings */
- for (map_idx = 0; map_idx < device->num_axes; map_idx++) {
- joystick_axis_mapping_t *axis = &(device->axis_mapping[map_idx]);
+ for (inp_idx = 0; inp_idx < joydev->num_axes; inp_idx++) {
+ joystick_axis_t *axis = &joydev->axes[inp_idx];
- if (axis->pot > 0) {
+ if (axis->mapping.pot > 0) {
fprintf(fp, "%i %i %i %i %u\n",
- dev_idx, JOY_INPUT_AXIS, map_idx, JOY_ACTION_POT_AXIS, axis->pot);
+ dev_idx, JOY_INPUT_AXIS, inp_idx, JOY_ACTION_POT_AXIS, axis->mapping.pot);
} else {
- mapping_dump_map(fp, dev_idx, JOY_INPUT_AXIS, row + 0, &(axis->positive_direction));
- mapping_dump_map(fp, dev_idx, JOY_INPUT_AXIS, row + 1, &(axis->negative_direction));
+ mapping_dump_map(fp, dev_idx, JOY_INPUT_AXIS, row + 0, &axis->mapping.positive);
+ mapping_dump_map(fp, dev_idx, JOY_INPUT_AXIS, row + 1, &axis->mapping.negative);
}
fprintf(fp, "\n");
row += 2;
@@ -1362,23 +1372,23 @@
}
/* dump button mappings */
- for (map_idx = 0; map_idx < device->num_buttons; map_idx++) {
- joystick_button_mapping_t *button = &(device->button_mapping[map_idx]);
+ for (inp_idx = 0; inp_idx < joydev->num_buttons; inp_idx++) {
+ joystick_button_t *button = &joydev->buttons[inp_idx];
- mapping_dump_map(fp, dev_idx, JOY_INPUT_BUTTON, map_idx, &button->mapping);
+ mapping_dump_map(fp, dev_idx, JOY_INPUT_BUTTON, inp_idx, &button->mapping);
}
fprintf(fp, "\n");
/* dump hat mappings */
row = 0;
- for (map_idx = 0; map_idx < device->num_hats; map_idx++) {
- joystick_hat_mapping_t *hat = &(device->hat_mapping[map_idx]);
+ for (inp_idx = 0; inp_idx < joydev->num_hats; inp_idx++) {
+ joystick_hat_t *hat = &joydev->hats[inp_idx];
/* indexes 0-3 are hardcoded to up, down, left and right */
- mapping_dump_map(fp, dev_idx, JOY_INPUT_HAT, row + 0, &(hat->up));
- mapping_dump_map(fp, dev_idx, JOY_INPUT_HAT, row + 1, &(hat->down));
- mapping_dump_map(fp, dev_idx, JOY_INPUT_HAT, row + 2, &(hat->left));
- mapping_dump_map(fp, dev_idx, JOY_INPUT_HAT, row + 3, &(hat->right));
+ mapping_dump_map(fp, dev_idx, JOY_INPUT_HAT, row + 0, &hat->mapping.up);
+ mapping_dump_map(fp, dev_idx, JOY_INPUT_HAT, row + 1, &hat->mapping.down);
+ mapping_dump_map(fp, dev_idx, JOY_INPUT_HAT, row + 2, &hat->mapping.left);
+ mapping_dump_map(fp, dev_idx, JOY_INPUT_HAT, row + 3, &hat->mapping.right);
row += 4;
}
@@ -1398,18 +1408,20 @@
int i, k;
for (i = 0; i < num_joystick_devices; ++i) {
- for (k = 0; k < joystick_devices[i].num_axes; ++k) {
- joystick_devices[i].axis_mapping[k].positive_direction.action = JOY_ACTION_NONE;
- joystick_devices[i].axis_mapping[k].negative_direction.action = JOY_ACTION_NONE;
+ joystick_device_t *joydev = joystick_devices[i];
+
+ for (k = 0; k < joydev->num_axes; ++k) {
+ joydev->axes[k].mapping.positive.action = JOY_ACTION_NONE;
+ joydev->axes[k].mapping.negative.action = JOY_ACTION_NONE;
}
- for (k = 0; k < joystick_devices[i].num_buttons; ++k) {
- joystick_devices[i].button_mapping[k].mapping.action = JOY_ACTION_NONE;
+ for (k = 0; k < joystick_devices[i]->num_buttons; ++k) {
+ joydev->buttons[k].mapping.action = JOY_ACTION_NONE;
}
- for (k = 0; k < joystick_devices[i].num_hats; ++k) {
- joystick_devices[i].hat_mapping[k].up.action = JOY_ACTION_NONE;
- joystick_devices[i].hat_mapping[k].down.action = JOY_ACTION_NONE;
- joystick_devices[i].hat_mapping[k].left.action = JOY_ACTION_NONE;
- joystick_devices[i].hat_mapping[k].right.action = JOY_ACTION_NONE;
+ for (k = 0; k < joystick_devices[i]->num_hats; ++k) {
+ joydev->hats[k].mapping.up.action = JOY_ACTION_NONE;
+ joydev->hats[k].mapping.down.action = JOY_ACTION_NONE;
+ joydev->hats[k].mapping.left.action = JOY_ACTION_NONE;
+ joydev->hats[k].mapping.right.action = JOY_ACTION_NONE;
}
}
}
@@ -1580,13 +1592,13 @@
*/
static bool parser_set_axis(const parser_state_t *state)
{
- joystick_device_t *dev = &(joystick_devices[state->joy_index]);
+ joystick_device_t *joydev = joystick_devices[state->joy_index];
bool result = true;
if (state->action == JOY_ACTION_POT_AXIS) {
/* map to potentiometer */
- if (state->input_index < dev->num_axes) {
- dev->axis_mapping[state->input_index].pot = state->args.pot;
+ if (state->input_index < joydev->num_axes) {
+ joydev->axes[state->input_index].mapping.pot = state->args.pot;
} else {
result = false;
}
@@ -1599,15 +1611,15 @@
printf("%s(): AXIS: index = %d, direction = %s\n",
__func__, index, direction == 0 ? "positive" : "negative");
#endif
- if (index < dev->num_axes) {
- joystick_axis_mapping_t *axis = &(dev->axis_mapping[index]);
- joystick_mapping_t *mapping;
+ if (index < joydev->num_axes) {
+ joystick_axis_t *axis = &joydev->axes[index];
+ joystick_mapping_t *mapping;
/* select directional mapping */
if (direction == 0) {
- mapping = &(axis->positive_direction);
+ mapping = &axis->mapping.positive;
} else {
- mapping = &(axis->negative_direction);
+ mapping = &axis->mapping.negative;
}
parser_set_mapping(state, mapping);
} else {
@@ -1631,18 +1643,17 @@
*/
static bool parser_set_button(const parser_state_t *state)
{
- joystick_device_t *dev = &(joystick_devices[state->joy_index]);
- int button = state->input_index;
+ joystick_device_t *joydev = joystick_devices[state->joy_index];
+ int index = state->input_index;
bool result = true;
- if (button < dev->num_buttons) {
- joystick_mapping_t *mapping = &(dev->button_mapping[button].mapping);
-
+ if (index < joydev->num_buttons) {
+ joystick_mapping_t *mapping = &joydev->buttons[index].mapping;
parser_set_mapping(state, mapping);
} else {
parser_log_error(state,
"invalid button index %d for joystick %d.",
- button, state->joy_index);
+ index, state->joy_index);
result = false;
}
return result;
@@ -1656,26 +1667,26 @@
*/
static bool parser_set_hat(const parser_state_t *state)
{
- int index = state->input_index / 4;
- int direction = state->input_index % 4;
- joystick_device_t *dev = &(joystick_devices[state->joy_index]);
+ int index = state->input_index / 4;
+ int direction = state->input_index % 4;
+ joystick_device_t *joydev = joystick_devices[state->joy_index];
- if (index < dev->num_hats) {
- joystick_hat_mapping_t *hat = &(dev->hat_mapping[index]);
- joystick_mapping_t *mapping;
+ if (index < joydev->num_hats) {
+ joystick_hat_t *hat = &joydev->hats[index];
+ joystick_mapping_t *mapping;
switch (direction) {
case JOY_HAT_UP:
- mapping = &(hat->up);
+ mapping = &hat->mapping.up;
break;
case JOY_HAT_DOWN:
- mapping = &(hat->down);
+ mapping = &hat->mapping.down;
break;
case JOY_HAT_LEFT:
- mapping = &(hat->left);
+ mapping = &hat->mapping.left;
break;
case JOY_HAT_RIGHT:
- mapping = &(hat->right);
+ mapping = &hat->mapping.right;
break;
default:
/* never reached, to satisfy gcc */
@@ -2695,6 +2706,12 @@
joystick_alarm = alarm_new(maincpu_alarm_context, "Joystick",
joystick_latch_handler, NULL);
+ /* preallocate devices array */
+ num_joystick_devices = 0;
+ max_joystick_devices = 16;
+ joystick_devices = lib_malloc(sizeof *joystick_devices * max_joystick_devices);
+ joystick_devices[0] = NULL;
+
#ifdef COMMON_JOYKEYS
kbd_initialize_numpad_joykeys(joykeys[0]);
#endif
@@ -2718,7 +2735,7 @@
for (i = 0; i < JOYPORT_MAX_PORTS; i++) {
if (joystick_port_map[i] >= JOYDEV_REALJOYSTICK_MIN) {
if (joystick_port_map[i] - JOYDEV_REALJOYSTICK_MIN < num_joystick_devices) {
- joystick_devices[joystick_port_map[i] - JOYDEV_REALJOYSTICK_MIN].joyport = i;
+ joystick_devices[joystick_port_map[i] - JOYDEV_REALJOYSTICK_MIN]->joyport = i;
} else {
joystick_port_map[i] = JOYDEV_NONE;
}
@@ -2801,6 +2818,7 @@
*/
static int gtkjoy_pins[JOYPORT_MAX_PORTS][JOYPORT_MAX_PINS];
+#if 0
void register_joystick_driver(
struct joystick_driver_s *driver,
const char *jname,
@@ -2813,10 +2831,10 @@
joystick_devices = lib_realloc(joystick_devices,
sizeof(struct joystick_device_s) * (num_joystick_devices + 1));
- new_joystick_device = &joystick_devices[num_joystick_devices++];
+ new_joystick_device = joystick_devices[num_joystick_devices++];
new_joystick_device->driver = driver;
- strncpy(new_joystick_device->jname, jname, JOYDEV_NAME_SIZE - 1);
- new_joystick_device->jname[JOYDEV_NAME_SIZE - 1] = '\0';
+ strncpy(new_joystick_device->name, jname, JOYDEV_NAME_SIZE - 1);
+ new_joystick_device->name[JOYDEV_NAME_SIZE - 1] = '\0';
new_joystick_device->num_axes = num_axes;
new_joystick_device->num_hats = num_hats;
new_joystick_device->num_buttons = num_buttons;
@@ -2823,7 +2841,7 @@
log_message(joy_log,
"registered controller '%s' with %d %s, %d %s, %d %s",
- new_joystick_device->jname,
+ new_joystick_device->name,
num_axes, num_axes == 1 ? "axis" : "axes",
num_hats, num_hats == 1 ? "hat" : "hats",
num_buttons, num_buttons == 1 ? "button" : "buttons");
@@ -2893,6 +2911,7 @@
new_joystick_device->button_mapping[0].value.action = 2;
#endif
}
+#endif
/* When a host joystick event happens that cause a 'press' of a pin, increment the 'press amount' of that pin */
static void gtkjoy_set_value_press(unsigned int joyport, uint16_t value)
@@ -2972,10 +2991,12 @@
}
-void joy_axis_event(uint8_t joynum, uint8_t axis, joystick_axis_value_t value)
+void joy_axis_event(uint8_t joynum, uint8_t axis_index, joystick_axis_value_t value)
{
- joystick_axis_value_t prev = joystick_devices[joynum].axis_mapping[axis].prev;
- int joyport = joystick_devices[joynum].joyport;
+ joystick_device_t *joydev = joystick_devices[joynum];
+ joystick_axis_t *axis = &joydev->axes[axis_index];
+ joystick_axis_value_t prev = axis->prev;
+ int joyport = joydev->joyport;
if (value == prev) {
return;
@@ -2985,26 +3006,27 @@
/* release directions first if needed */
if (prev == JOY_AXIS_POSITIVE) {
- joy_perform_event(&joystick_devices[joynum].axis_mapping[axis].positive_direction, joyport, 0);
+ joy_perform_event(&axis->mapping.positive, joyport, 0);
}
if (prev == JOY_AXIS_NEGATIVE) {
- joy_perform_event(&joystick_devices[joynum].axis_mapping[axis].negative_direction, joyport, 0);
+ joy_perform_event(&axis->mapping.negative, joyport, 0);
}
/* press new direction if needed */
if (value == JOY_AXIS_POSITIVE) {
- joy_perform_event(&joystick_devices[joynum].axis_mapping[axis].positive_direction, joyport, 1);
+ joy_perform_event(&axis->mapping.positive, joyport, 1);
}
if (value == JOY_AXIS_NEGATIVE) {
- joy_perform_event(&joystick_devices[joynum].axis_mapping[axis].negative_direction, joyport, 1);
+ joy_perform_event(&axis->mapping.negative, joyport, 1);
}
- joystick_devices[joynum].axis_mapping[axis].prev = value;
+ axis->prev = value;
}
void joy_button_event(uint8_t joynum, uint8_t button, uint8_t value)
{
- int pressed = value ? 1 : 0;
+ joystick_device_t *joydev = joystick_devices[joynum];
+ int32_t pressed = value ? 1 : 0;
#if 0
int num_buttons = joystick_devices[joynum].num_buttons;
int joy_pin = joystick_devices[joynum].button_mapping[button].value.joy_pin;
@@ -3018,56 +3040,58 @@
}
}
#endif
- if (pressed != joystick_devices[joynum].button_mapping[button].prev) {
+ if (pressed != joydev->buttons[button].prev) {
DBG(("joy_button_event: joynum: %d, button: %d pressed: %d\n",
joynum, button, pressed));
- joy_perform_event(&(joystick_devices[joynum].button_mapping[button].mapping),
- joystick_devices[joynum].joyport, pressed);
- joystick_devices[joynum].button_mapping[button].prev = pressed;
+ joy_perform_event(&joydev->buttons[button].mapping,
+ joydev->joyport,
+ ...
[truncated message content] |
|
From: <co...@us...> - 2025-03-05 17:05:51
|
Revision: 45515
http://sourceforge.net/p/vice-emu/code/45515
Author: compyx
Date: 2025-03-05 17:05:34 +0000 (Wed, 05 Mar 2025)
Log Message:
-----------
Gtk3: fix memory leak in clipboard handling
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/actions-clipboard.c
Modified: trunk/vice/src/arch/gtk3/actions-clipboard.c
===================================================================
--- trunk/vice/src/arch/gtk3/actions-clipboard.c 2025-03-04 19:45:20 UTC (rev 45514)
+++ trunk/vice/src/arch/gtk3/actions-clipboard.c 2025-03-05 17:05:34 UTC (rev 45515)
@@ -80,6 +80,7 @@
tmp,
(gint)len);
lib_free(tmp);
+ lib_free(text);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-03-04 19:45:32
|
Revision: 45514
http://sourceforge.net/p/vice-emu/code/45514
Author: gpz
Date: 2025-03-04 19:45:20 +0000 (Tue, 04 Mar 2025)
Log Message:
-----------
Fix for [bugs:#2116], remove aliasing noise by dithering. patch by Leandro Nini.
Modified Paths:
--------------
trunk/vice/src/resid/filter8580new.h
Modified: trunk/vice/src/resid/filter8580new.h
===================================================================
--- trunk/vice/src/resid/filter8580new.h 2025-03-04 19:07:36 UTC (rev 45513)
+++ trunk/vice/src/resid/filter8580new.h 2025-03-04 19:45:20 UTC (rev 45514)
@@ -23,6 +23,7 @@
#include "resid-config.h"
#include <cassert>
+#include <cstdlib>
namespace reSID
{
@@ -648,6 +649,23 @@
static model_filter_t model_filter[2];
friend class SID;
+
+private:
+ class Randomnoise
+ {
+ private:
+ int buffer[1024];
+ mutable int index = 0;
+ public:
+ Randomnoise()
+ {
+ for (int i=0; i<1024; i++)
+ buffer[i] = rand() % (1<<19);
+ }
+ int getNoise() const { index = (index + 1) & 0x3ff; return buffer[index]; }
+ };
+
+ Randomnoise rnd;
};
@@ -667,9 +685,9 @@
{
model_filter_t& f = model_filter[sid_model];
- v1 = (voice1*f.voice_scale_s14 >> 18) + f.voice_DC;
- v2 = (voice2*f.voice_scale_s14 >> 18) + f.voice_DC;
- v3 = (voice3*f.voice_scale_s14 >> 18) + f.voice_DC;
+ v1 = ((voice1*f.voice_scale_s14 + rnd.getNoise()) >> 18) + f.voice_DC;
+ v2 = ((voice2*f.voice_scale_s14 + rnd.getNoise()) >> 18) + f.voice_DC;
+ v3 = ((voice3*f.voice_scale_s14 + rnd.getNoise()) >> 18) + f.voice_DC;
// Sum inputs routed into the filter.
int Vi = 0;
@@ -768,9 +786,9 @@
{
model_filter_t& f = model_filter[sid_model];
- v1 = (voice1*f.voice_scale_s14 >> 18) + f.voice_DC;
- v2 = (voice2*f.voice_scale_s14 >> 18) + f.voice_DC;
- v3 = (voice3*f.voice_scale_s14 >> 18) + f.voice_DC;
+ v1 = ((voice1*f.voice_scale_s14 + rnd.getNoise()) >> 18) + f.voice_DC;
+ v2 = ((voice2*f.voice_scale_s14 + rnd.getNoise()) >> 18) + f.voice_DC;
+ v3 = ((voice3*f.voice_scale_s14 + rnd.getNoise()) >> 18) + f.voice_DC;
// Enable filter on/off.
// This is not really part of SID, but is useful for testing.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rh...@us...> - 2025-03-04 19:07:39
|
Revision: 45513
http://sourceforge.net/p/vice-emu/code/45513
Author: rhialto
Date: 2025-03-04 19:07:36 +0000 (Tue, 04 Mar 2025)
Log Message:
-----------
fsimage_read_dxx_image() for DISK_IMAGE_TYPE_D80/D82 got its disk ID bytes from the wrong place.
Nobody ever noticed because for 8050/8250 drives, we currently don't emulate the disk at the gcr level but by emulating the job queue commands, so no gcr is involved and this function is not called anyway.
Modified Paths:
--------------
trunk/vice/src/diskconstants.h
trunk/vice/src/diskimage/fsimage-dxx.c
trunk/vice/src/vdrive/vdrive.c
Modified: trunk/vice/src/diskconstants.h
===================================================================
--- trunk/vice/src/diskconstants.h 2025-03-03 00:17:40 UTC (rev 45512)
+++ trunk/vice/src/diskconstants.h 2025-03-04 19:07:36 UTC (rev 45513)
@@ -146,8 +146,8 @@
#define HDR_SECTOR_8050 0 /* block w/disk name */
#define BAM_TRACK_8050 38
#define BAM_SECTOR_8050 0
-#define BAM_NAME_8050 6 /* pos. of disk name in header blk */
-#define BAM_ID_8050 24 /* pos. of disk id in header blk */
+#define HDR_NAME_8050 6 /* pos. of disk name in header blk */
+#define HDR_ID_8050 24 /* pos. of disk id in header blk */
#define DIR_TRACK_8050 39
#define DIR_SECTOR_8050 1
@@ -159,8 +159,8 @@
#define HDR_SECTOR_8250 HDR_SECTOR_8050
#define BAM_TRACK_8250 BAM_TRACK_8050
#define BAM_SECTOR_8250 BAM_SECTOR_8050
-#define BAM_NAME_8250 BAM_NAME_8050 /* pos. of disk name in hdr blk */
-#define BAM_ID_8250 BAM_ID_8050 /* pos. of disk id in hdr blk */
+#define HDR_NAME_8250 HDR_NAME_8050 /* pos. of disk name in hdr blk */
+#define HDR_ID_8250 HDR_ID_8050 /* pos. of disk id in hdr blk */
#define DIR_TRACK_8250 DIR_TRACK_8050
#define DIR_SECTOR_8250 DIR_SECTOR_8050
Modified: trunk/vice/src/diskimage/fsimage-dxx.c
===================================================================
--- trunk/vice/src/diskimage/fsimage-dxx.c 2025-03-03 00:17:40 UTC (rev 45512)
+++ trunk/vice/src/diskimage/fsimage-dxx.c 2025-03-04 19:07:36 UTC (rev 45513)
@@ -166,8 +166,8 @@
if (image->type == DISK_IMAGE_TYPE_D80
|| image->type == DISK_IMAGE_TYPE_D82) {
- sectors = disk_image_check_sector(image, BAM_TRACK_8050, BAM_SECTOR_8050);
- bam_id = &buffer[BAM_ID_8050];
+ sectors = disk_image_check_sector(image, HDR_TRACK_8050, HDR_SECTOR_8050);
+ bam_id = &buffer[HDR_ID_8050];
} else {
sectors = disk_image_check_sector(image, BAM_TRACK_1541, BAM_SECTOR_1541);
bam_id = &buffer[BAM_ID_1541];
Modified: trunk/vice/src/vdrive/vdrive.c
===================================================================
--- trunk/vice/src/vdrive/vdrive.c 2025-03-03 00:17:40 UTC (rev 45512)
+++ trunk/vice/src/vdrive/vdrive.c 2025-03-04 19:07:36 UTC (rev 45513)
@@ -650,8 +650,8 @@
vdrive->Bam_Sector = BAM_SECTOR_8050;
vdrive->Header_Track = HDR_TRACK_8050;
vdrive->Header_Sector = HDR_SECTOR_8050;
- vdrive->bam_name = BAM_NAME_8050;
- vdrive->bam_id = BAM_ID_8050;
+ vdrive->bam_name = HDR_NAME_8050;
+ vdrive->bam_id = HDR_ID_8050;
vdrive->Dir_Track = DIR_TRACK_8050;
vdrive->Dir_Sector = DIR_SECTOR_8050;
break;
@@ -660,8 +660,8 @@
vdrive->Bam_Sector = BAM_SECTOR_8250;
vdrive->Header_Track = HDR_TRACK_8250;
vdrive->Header_Sector = HDR_SECTOR_8250;
- vdrive->bam_name = BAM_NAME_8250;
- vdrive->bam_id = BAM_ID_8250;
+ vdrive->bam_name = HDR_NAME_8250;
+ vdrive->bam_id = HDR_ID_8250;
vdrive->Dir_Track = DIR_TRACK_8250;
vdrive->Dir_Sector = DIR_SECTOR_8250;
break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gp...@us...> - 2025-03-03 00:17:46
|
Revision: 45512
http://sourceforge.net/p/vice-emu/code/45512
Author: gpz
Date: 2025-03-03 00:17:40 +0000 (Mon, 03 Mar 2025)
Log Message:
-----------
fix division by zero in monitor i command, should fix #2130
Modified Paths:
--------------
trunk/vice/src/monitor/mon_memory.c
Modified: trunk/vice/src/monitor/mon_memory.c
===================================================================
--- trunk/vice/src/monitor/mon_memory.c 2025-03-01 13:54:56 UTC (rev 45511)
+++ trunk/vice/src/monitor/mon_memory.c 2025-03-03 00:17:40 UTC (rev 45512)
@@ -282,7 +282,16 @@
int bank;
mem_get_screen_parameter(&base, &rows, &screen_width, &bank);
+ /* HACK: mem_get_screen_parameter() returns actual screen size from the
+ video chip registers - this can be zero rows or zero columns! If
+ width is 0, use last known terminal width instead, to avoid division
+ by 0 further below. */
+ if (screen_width == 0) {
+ screen_width = last_known_xres;
+ }
+
max_width = screen_width;
+
if (max_width > (last_known_xres - (7 + 2))) {
max_width = (last_known_xres - (7 + 2));
/* to make the output easier to read, make sure the number of items
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-03-01 13:55:02
|
Revision: 45511
http://sourceforge.net/p/vice-emu/code/45511
Author: compyx
Date: 2025-03-01 13:54:56 +0000 (Sat, 01 Mar 2025)
Log Message:
-----------
Create branch for joystick device scanning/registering rework
Added Paths:
-----------
branches/compyx/joymap-001/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-03-01 08:45:31
|
Revision: 45510
http://sourceforge.net/p/vice-emu/code/45510
Author: compyx
Date: 2025-03-01 08:45:24 +0000 (Sat, 01 Mar 2025)
Log Message:
-----------
Gtk3: Fix non-ASCII codes appearing in the clipboard with "Edit" -> "Copy"
See bug #2087.
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/actions-clipboard.c
Modified: trunk/vice/src/arch/gtk3/actions-clipboard.c
===================================================================
--- trunk/vice/src/arch/gtk3/actions-clipboard.c 2025-02-27 19:28:21 UTC (rev 45509)
+++ trunk/vice/src/arch/gtk3/actions-clipboard.c 2025-03-01 08:45:24 UTC (rev 45510)
@@ -34,6 +34,7 @@
#include <stddef.h>
#include <stdbool.h>
#include <string.h>
+#include <ctype.h>
#include "charset.h"
#include "clipboard.h"
@@ -50,11 +51,35 @@
*/
static void edit_copy_action(ui_action_map_t *self)
{
+#ifdef WINDOWS_COMPILE
+ char *text = clipboard_read_screen_output("\r\n");
+#else
char *text = clipboard_read_screen_output("\n");
+#endif
+ if (text != NULL) {
+ size_t i;
+ size_t len;
+ char *tmp;
- if (text != NULL) {
+ /* Some characters were translated to ASCII by clipboard_read_screen_output(),
+ * but just about anything in the non a-zA-Z range wasn't so we need to
+ * mangle the text further: */
+ len = strlen(text);
+ tmp = lib_malloc(len + 1u);
+ for (i = 0; i < len; i++) {
+ unsigned char c = (unsigned char)text[i];
+ if ((c == '\r' || c == '\n') || (c < 127 && isprint(c))) {
+ tmp[i] = (char)c;
+ } else {
+ tmp[i] = '?';
+ }
+ }
+ tmp[len] = '\0';
+
gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD),
- text, (gint)strlen(text));
+ tmp,
+ (gint)len);
+ lib_free(tmp);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-02-27 19:28:23
|
Revision: 45509
http://sourceforge.net/p/vice-emu/code/45509
Author: compyx
Date: 2025-02-27 19:28:21 +0000 (Thu, 27 Feb 2025)
Log Message:
-----------
Gtk3: Add label "Master volume" in front of volume slider
In the settings node "Audio" -> "Sound driver", add a label next to the volume
slider to avoid confusion for certain citrus people.
Modified Paths:
--------------
trunk/vice/src/arch/gtk3/widgets/settings_sound.c
Modified: trunk/vice/src/arch/gtk3/widgets/settings_sound.c
===================================================================
--- trunk/vice/src/arch/gtk3/widgets/settings_sound.c 2025-02-27 07:42:17 UTC (rev 45508)
+++ trunk/vice/src/arch/gtk3/widgets/settings_sound.c 2025-02-27 19:28:21 UTC (rev 45509)
@@ -105,6 +105,7 @@
GtkWidget *scale;
GtkWidget *enabled_check;
GtkWidget *warp_enabled_check;
+ GtkWidget *label;
/* outer grid: contains the checkbox and an 'inner' grid for the widgets */
outer = gtk_grid_new();
@@ -112,8 +113,16 @@
/* add checkbox for 'sound enabled' */
enabled_check = vice_gtk3_resource_check_button_new("Sound",
"Enable sound emulation");
- gtk_grid_attach(GTK_GRID(outer), enabled_check, 0, 0, 1, 1);
+ gtk_grid_attach(GTK_GRID(outer), enabled_check, 0, 0, 2, 1);
+ warp_enabled_check = vice_gtk3_resource_check_button_new("SoundEmulateOnWarp",
+ "Enable sound emulation in warp mode. (Disabling has a negative impact on compatibility)");
+ gtk_grid_attach(GTK_GRID(outer), warp_enabled_check, 0, 1, 2, 1);
+
+ label = gtk_label_new("Master volume");
+ gtk_widget_set_halign(label, GTK_ALIGN_START);
+ gtk_widget_set_margin_end(label, 8); /* a litte more space to avoid the
+ slider handle touching the text */
scale = vice_gtk3_resource_scale_custom_new_printf("%s",
GTK_ORIENTATION_HORIZONTAL,
0,
@@ -125,18 +134,14 @@
"SoundVolume");
gtk_widget_set_hexpand(scale, TRUE);
gtk_scale_set_value_pos(GTK_SCALE(scale), GTK_POS_RIGHT);
- gtk_grid_attach(GTK_GRID(outer), scale, 1, 0, 1, 1);
-
- warp_enabled_check = vice_gtk3_resource_check_button_new("SoundEmulateOnWarp",
- "Enable sound emulation in warp mode. (Disabling has a negative impact on compatibility)");
- gtk_grid_attach(GTK_GRID(outer), warp_enabled_check, 0, 1, 2, 1);
-
+ gtk_grid_attach(GTK_GRID(outer), label, 0, 2, 1, 1);
+ gtk_grid_attach(GTK_GRID(outer), scale, 1, 2, 1, 1);
/* inner grid: contains widgets and can be enabled/disabled depending on
* the state of the 'sound enabled' checkbox */
inner = create_inner_grid();
gtk_widget_set_margin_top(inner, 16);
- gtk_grid_attach(GTK_GRID(outer), inner, 0, 2, 2, 1);
+ gtk_grid_attach(GTK_GRID(outer), inner, 0, 3, 2, 1);
gtk_widget_show_all(outer);
return outer;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-02-27 07:42:19
|
Revision: 45508
http://sourceforge.net/p/vice-emu/code/45508
Author: compyx
Date: 2025-02-27 07:42:17 +0000 (Thu, 27 Feb 2025)
Log Message:
-----------
Gtk3: make evdev the only driver for Linux
Remove deprecated /dev/joy API in favor of evdev's /dev/input, which has been
the default since march 2024 anyway. One driver to rule them all ... on Linux.
Modified Paths:
--------------
trunk/vice/configure.ac
trunk/vice/doc/building/Linux-GTK3-Howto.txt
trunk/vice/src/arch/gtk3/joystickdrv/Makefile.am
trunk/vice/src/arch/gtk3/joystickdrv/joystick_linux_evdev.c
Removed Paths:
-------------
trunk/vice/src/arch/gtk3/joystickdrv/joystick_linux.c
Modified: trunk/vice/configure.ac
===================================================================
--- trunk/vice/configure.ac 2025-02-25 16:07:33 UTC (rev 45507)
+++ trunk/vice/configure.ac 2025-02-27 07:42:17 UTC (rev 45508)
@@ -140,9 +140,6 @@
dnl Needed for WIC64
VICE_ARG_WITH_LIST(libcurl, [ --without-libcurl disable libcurl support [[default=no]]])
-dnl Linux evdev joysticks
-VICE_ARG_WITH_LIST(evdev, [ --without-evdev disable Linux evdev joystick driver [[default=no]]])
-
dnl
dnl UI options
dnl
@@ -2062,22 +2059,14 @@
JOY_LIBS=
AM_CONDITIONAL(HAVE_LINUX_EVDEV, false)
if test x"$is_unix_x11" = "xyes" -a x"$enable_sdl1ui" != "xyes" -a x"$enable_sdl2ui" != "xyes" -a x"$enable_headlessui" != "xyes"; then
- AC_CHECK_HEADER(linux/joystick.h,
- [
- AC_CHECK_DECL(JS_VERSION,[
- LINUX_JOYSTICK_SUPPORT="yes";
- AC_DEFINE(LINUX_JOYSTICK,,
- [Enable support for Linux style joysticks.])
- JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS joystick_linux.o";
- ],[],[#include <linux/joystick.h>])],)
dnl Linux evdev joystick driver
- if test x"$with_evdev" != "xno" -a x"$is_unix_linux" = "xyes"; then
+ if test x"$is_unix_linux" = "xyes"; then
PKG_CHECK_MODULES([libevdev],
[libevdev],
[AC_DEFINE(HAVE_LINUX_EVDEV,,[Enable support for Linux evdev joysticks.])
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS joystick_linux_evdev.o"
HAVE_LINUX_EVDEV_SUPPORT="yes"],
- [AC_MSG_ERROR([Linux evdev joystick driver requested (--with-evdev) but the libevdev headers are missing.])])
+ [AC_MSG_ERROR([Please install libevdev headers.])])
VICE_CFLAGS="$VICE_CFLAGS $libevdev_CFLAGS"
VICE_CXXFLAGS="$VICE_CXXFLAGS $libevdev_CXXFLAGS"
LIBS="$LIBS $libevdev_LIBS"
@@ -3760,7 +3749,6 @@
echo "Install XDG .desktop files : $USE_DESKTOP_FILES"
echo "icotool for Windows found : $ICOTOOL"
echo "Experimental devices emulation: $HAVE_EXPERIMENTAL_DEVICES_SUPPORT (--enable-experimental-devices)"
-echo "Linux evdev joystick driver : $HAVE_LINUX_EVDEV_SUPPORT (--with-evdev)"
echo ""
echo "User CPPFLAGS: $CPPFLAGS"
Modified: trunk/vice/doc/building/Linux-GTK3-Howto.txt
===================================================================
--- trunk/vice/doc/building/Linux-GTK3-Howto.txt 2025-02-25 16:07:33 UTC (rev 45507)
+++ trunk/vice/doc/building/Linux-GTK3-Howto.txt 2025-02-27 07:42:17 UTC (rev 45508)
@@ -8,8 +8,7 @@
Tested on: Linux Mint 19, 20
Ubuntu 17.10.1, 18.04, 19.04, 20.04.3-LTS 22.04 22.10 23.04 23.10
- Debian 9.0-9.8, 10.0, 10.3, 10.4, 10.5, 10.6, 11.0, 11.1, 11.2 11.3
- 11.4 11.5 11.6 11.7 12.0
+ Debian 9.0-9.8, 10.0, 10.3, 10.4, 10.5, 10.6, 11.0-11.7 12.0-12.9
--------------------------------------------------------------------------------
1. adhoc build from SVN
@@ -41,9 +40,7 @@
$ sudo apt-get install libasound2-dev # for ALSA sound support
$ sudo apt-get install libglew-dev # for OpenGL hardware scaling support
$ sudo apt-get install libcurl4-openssl-dev # for WiC64, >= 7.71.0 is required
-$ sudo apt-get install libevdev-dev # for Linux evdev joystick driver,
- # can be omitted if `--without-evdev`
- # was passed to configure
+$ sudo apt-get install libevdev-dev # for Linux evdev joystick driver
If you plan on building the PDF documentation, you will also need to install
whatever package includes "epsf.tex". It was recently in "texlive-plain-generic".
Modified: trunk/vice/src/arch/gtk3/joystickdrv/Makefile.am
===================================================================
--- trunk/vice/src/arch/gtk3/joystickdrv/Makefile.am 2025-02-25 16:07:33 UTC (rev 45507)
+++ trunk/vice/src/arch/gtk3/joystickdrv/Makefile.am 2025-02-27 07:42:17 UTC (rev 45508)
@@ -20,17 +20,38 @@
noinst_LIBRARIES = libjoystickdrv.a
-# These sources are always linked
-libjoystickdrv_a_SOURCES = \
- joystick_linux.c
+if WINDOWS_COMPILE
+libjoystickdrv_a_SOURCES = joystick_win32_directinput.c
+EXTRA_libjoystickdrv_a_SOURCES = \
+ joystick_bsd.c \
+ joystick_linux_evdev.c \
+ joystick_osx.c
+endif
-# These sources are conditionally linked
+if MACOS_COMPILE
+libjoystickdrv_a_SOURCES = joystick_osx.c
EXTRA_libjoystickdrv_a_SOURCES = \
joystick_bsd.c \
joystick_linux_evdev.c \
+ joystick_win32_directinput.c
+endif
+
+if LINUX_COMPILE
+libjoystickdrv_a_SOURCES = joystick_linux_evdev.c
+EXTRA_libjoystickdrv_a_SOURCES = \
+ joystick_bsd.c \
joystick_osx.c \
joystick_win32_directinput.c
+endif
+if BSD_COMPILE
+libjoystickdrv_a_SOURCES = joystick_bsd.c
+EXTRA_libjoystickdrv_a_SOURCES = \
+ joystick_linux_evdev.c \
+ joystick_osx.c \
+ joystick_win32_directinput.c
+endif
+
libjoystickdrv_a_DEPENDENCIES = \
@JOYSTICK_DRIVERS@
Deleted: trunk/vice/src/arch/gtk3/joystickdrv/joystick_linux.c
===================================================================
--- trunk/vice/src/arch/gtk3/joystickdrv/joystick_linux.c 2025-02-25 16:07:33 UTC (rev 45507)
+++ trunk/vice/src/arch/gtk3/joystickdrv/joystick_linux.c 2025-02-27 07:42:17 UTC (rev 45508)
@@ -1,219 +0,0 @@
-/** \file joystick_linux.c
- * \brief Linux joystick support
- *
- * \author Bernhard Kuhn <ku...@ei...>
- * \author Ulmer Lionel <ul...@po...>
- * \author Marco van den Heuvel <bla...@ya...>
- * \author Daniel Sladic <sl...@ee...>
- * \author Krister Walfridsson <ca...@df...>
- * \author Luca Montecchiani <m....@us...> (http://i.am/m.luca)
- */
-
-/*
- * This file is part of VICE, the Versatile Commodore Emulator.
- * See README for copyright notice.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307 USA.
- *
- */
-
-#include "vice.h"
-#include "archdep_defs.h"
-
-#if defined(LINUX_JOYSTICK) && !defined(HAVE_LINUX_EVDEV)
-
-#include <fcntl.h>
-#include <linux/joystick.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "joyport.h"
-#include "joystick.h"
-#include "log.h"
-#include "types.h"
-#include "lib.h"
-
-
-/** \brief Number of device nodes to scan */
-#define ANALOG_JOY_NUM 8
-
-/** \brief Private, driver-specific data of the device */
-typedef struct linux_joystick_priv_s {
- int fd; /**< file descriptor of the joystick device node */
-} linux_joystick_priv_t;
-
-
-/** \brief Linux joystick log */
-static log_t joystick_linux_log = LOG_DEFAULT;
-
-
-/** \brief Callback for the joystick system to poll a joystick device
- *
- * \param[in] joyport joystick device index
- * \param[in] priv driver-specific data
- */
-static void linux_joystick_poll(int joyport, void *priv)
-{
- linux_joystick_priv_t *joypriv = priv;
- struct js_event event;
-
- /* Read all queued events. */
- while (read(joypriv->fd, &event, sizeof event) == sizeof event) {
- joystick_axis_value_t direction;
-
- switch (event.type & ~JS_EVENT_INIT) {
-
- case JS_EVENT_BUTTON:
- joy_button_event((uint8_t)joyport, event.number, (int16_t)event.value);
- break;
-
- case JS_EVENT_AXIS:
- if (event.value > 16384) {
- direction = JOY_AXIS_POSITIVE;
- } else if (event.value < -16384) {
- direction = JOY_AXIS_NEGATIVE;
- } else {
- direction = JOY_AXIS_MIDDLE;
- }
- joy_axis_event((uint8_t)joyport, event.number, (int16_t)direction);
- break;
-
- default:
- break;
- }
- }
-}
-
-/** \brief Callback for the joystick system to close a joystick device
- *
- * \param[in] priv driver-specific data
- */
-static void linux_joystick_close(void *priv)
-{
- linux_joystick_priv_t *joypriv = priv;
-
- close(joypriv->fd);
- lib_free(joypriv);
-}
-
-
-/** \brief Object used to register driver for devices
- *
- * The address of this object is used in the joystick code, it isn't copied,
- * so we cannot move this into `linux_joystick_init()` to use for registration.
- */
-static joystick_driver_t driver = {
- .poll = linux_joystick_poll,
- .close = linux_joystick_close
-};
-
-
-/** \brief Initialize linux joysticks
- *
- * Scan joystick device nodes for valid devices and register them with the
- * joystick system.
- */
-void linux_joystick_init(void)
-{
- int i;
-
- if (joystick_linux_log == LOG_DEFAULT) {
- joystick_linux_log = log_open("Joystick");
- }
- log_message(joystick_linux_log, "Linux joystick interface initialization...");
-
- /* open analog device files */
- for (i = 0; i < ANALOG_JOY_NUM; i++) {
- char dev[256];
- int fd;
-
- memset(dev, 0, sizeof dev);
- snprintf(dev, sizeof dev - 1u, "/dev/js%d", i);
- fd = open(dev, O_RDONLY);
- if (fd < 0) {
- snprintf(dev, sizeof dev - 1u, "/dev/input/js%d", i);
- fd = open(dev, O_RDONLY);
- }
-
- if (fd >= 0) {
- struct JS_DATA_TYPE js;
- linux_joystick_priv_t *priv;
- char name[256];
- uint8_t axes;
- uint8_t buttons;
- int ver = 0;
-
- /* read joystick data */
- if (read(fd, &js, sizeof js) < 0) {
- close(fd);
- continue;
- }
-
- /* check if the runtime drive is at least 1.0 and thus supports
- * events: */
- if (ioctl(fd, JSIOCGVERSION, &ver) != 0) {
- log_message(joystick_linux_log,
- "%s unknown type", dev);
- log_message(joystick_linux_log,
- "Built in driver version: %d.%d.%d",
- JS_VERSION >> 16, (JS_VERSION >> 8) & 0xff, JS_VERSION & 0xff);
- log_message(joystick_linux_log,
- "Kernel driver version : 0.8 ??");
- log_message(joystick_linux_log,
- "Please update your Joystick driver!");
- close(fd);
- return;
- }
-
- /* get number of axis, number of buttons and name of device */
- memset(name, 0, sizeof name);
- ioctl(fd, JSIOCGAXES, &axes);
- ioctl(fd, JSIOCGBUTTONS, &buttons);
- ioctl(fd, JSIOCGNAME(sizeof name - 1u), name);
-
- log_message(joystick_linux_log,
- "%s is %s", dev, name);
- log_message(joystick_linux_log,
- "Built in driver version: %d.%d.%d",
- JS_VERSION >> 16, (JS_VERSION >> 8) & 0xff, JS_VERSION & 0xff);
- log_message(joystick_linux_log,
- "Kernel driver version : %d.%d.%d",
- ver >> 16, (ver >> 8) & 0xff, ver & 0xff);
-
- /* check geometry */
- if ((axes == 0) || (buttons == 0)) {
- log_message(joystick_linux_log,
- "Joystick with invalid geometry found -- ignoring.");
- close(fd);
- continue;
- }
-
- /* set file descriptor to non-blocking */
- fcntl(fd, F_SETFL, O_NONBLOCK);
-
- /* register device with the joystick system */
- priv = lib_malloc(sizeof *priv);
- priv->fd = fd;
- register_joystick_driver(&driver, name, priv, axes, buttons, 0);
- } else {
- log_warning(joystick_linux_log, "Cannot open joystick device `%s'.", dev);
- }
- }
-}
-
-# endif /* LINUX_JOYSTICK && !HAVE_LINUX_EVDEV */
Modified: trunk/vice/src/arch/gtk3/joystickdrv/joystick_linux_evdev.c
===================================================================
--- trunk/vice/src/arch/gtk3/joystickdrv/joystick_linux_evdev.c 2025-02-25 16:07:33 UTC (rev 45507)
+++ trunk/vice/src/arch/gtk3/joystickdrv/joystick_linux_evdev.c 2025-02-27 07:42:17 UTC (rev 45508)
@@ -34,8 +34,6 @@
#include "vice.h"
-#if defined(HAVE_LINUX_EVDEV)
-
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
@@ -480,5 +478,3 @@
}
free(namelist);
}
-
-#endif /* ifdef HAVE_LINUX_EVDEV */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-02-25 16:07:35
|
Revision: 45507
http://sourceforge.net/p/vice-emu/code/45507
Author: compyx
Date: 2025-02-25 16:07:33 +0000 (Tue, 25 Feb 2025)
Log Message:
-----------
XDG desktop files: use `$(DESTDIR)${prefix}` for installation
As suggested by Rhailto, use `--dir-=$(DESTDIR)${prefix}/share/applications` as
argument to `desktop-file-install` to support "normal" installation of .desktop
files through `make install` and allow for staged installs. Update the rules
to remove the .desktop files on `make uninstall` in the same vein.
With the default prefix of `/usr/local` that VICE's configure uses, the .desktop
files end up in `/usr/local/share/applications`, a directory that didn't exist
on my Debian system with Gnome, but which is created by `desktop-file-install`
and the .desktop files are processed by `update-desktop-database` and VICE's
application icons show up in the Gnome application overview and correctly launch
the emulators.
Note the use of `${prefix}` rather than `$(PREFIX)`, the later was empty on my
`make install`, resulting in .desktop files in `/share/applications` in the
root file system =)
Modified Paths:
--------------
trunk/vice/data/common/Makefile.am
Modified: trunk/vice/data/common/Makefile.am
===================================================================
--- trunk/vice/data/common/Makefile.am 2025-02-24 18:27:38 UTC (rev 45506)
+++ trunk/vice/data/common/Makefile.am 2025-02-25 16:07:33 UTC (rev 45507)
@@ -348,59 +348,31 @@
# this work for the canonical emulator names, alternate names will be a TODO.
install-desktop-files:
if SUPPORT_X64
- if test -n "$(DESTDIR)"; then \
- desktop-file-install --dir=$(DESTDIR)/usr/share/applications $(top_srcdir)/data/common/x64.desktop ;\
- else \
- desktop-file-install $(top_srcdir)/data/common/x64.desktop ;\
- fi
+ desktop-file-install --dir=$(DESTDIR)${prefix}/share/applications $(top_srcdir)/data/common/x64.desktop
endif
- if test -n "$(DESTDIR)"; then \
- desktop-file-install --dir=$(DESTDIR)/usr/share/applications $(top_srcdir)/data/common/x64sc.desktop ;\
- desktop-file-install --dir=$(DESTDIR)/usr/share/applications $(top_srcdir)/data/common/x64dtv.desktop ;\
- desktop-file-install --dir=$(DESTDIR)/usr/share/applications $(top_srcdir)/data/common/xscpu64.desktop ;\
- desktop-file-install --dir=$(DESTDIR)/usr/share/applications $(top_srcdir)/data/common/x128.desktop ;\
- desktop-file-install --dir=$(DESTDIR)/usr/share/applications $(top_srcdir)/data/common/xplus4.desktop ;\
- desktop-file-install --dir=$(DESTDIR)/usr/share/applications $(top_srcdir)/data/common/xvic.desktop ;\
- desktop-file-install --dir=$(DESTDIR)/usr/share/applications $(top_srcdir)/data/common/xpet.desktop ;\
- desktop-file-install --dir=$(DESTDIR)/usr/share/applications $(top_srcdir)/data/common/xcbm2.desktop ;\
- desktop-file-install --dir=$(DESTDIR)/usr/share/applications $(top_srcdir)/data/common/xcbm5x0.desktop ;\
- desktop-file-install --dir=$(DESTDIR)/usr/share/applications $(top_srcdir)/data/common/vsid.desktop ;\
- else \
- desktop-file-install $(top_srcdir)/data/common/x64sc.desktop ;\
- desktop-file-install $(top_srcdir)/data/common/x64dtv.desktop ;\
- desktop-file-install $(top_srcdir)/data/common/xscpu64.desktop ;\
- desktop-file-install $(top_srcdir)/data/common/x128.desktop ;\
- desktop-file-install $(top_srcdir)/data/common/xplus4.desktop ;\
- desktop-file-install $(top_srcdir)/data/common/xvic.desktop ;\
- desktop-file-install $(top_srcdir)/data/common/xpet.desktop ;\
- desktop-file-install $(top_srcdir)/data/common/xcbm2.desktop ;\
- desktop-file-install $(top_srcdir)/data/common/xcbm5x0.desktop ;\
- desktop-file-install $(top_srcdir)/data/common/vsid.desktop ;\
- fi
+ desktop-file-install --dir=$(DESTDIR)${prefix}/share/applications $(top_srcdir)/data/common/x64sc.desktop
+ desktop-file-install --dir=$(DESTDIR)${prefix}/share/applications $(top_srcdir)/data/common/x64dtv.desktop
+ desktop-file-install --dir=$(DESTDIR)${prefix}/share/applications $(top_srcdir)/data/common/xscpu64.desktop
+ desktop-file-install --dir=$(DESTDIR)${prefix}/share/applications $(top_srcdir)/data/common/x128.desktop
+ desktop-file-install --dir=$(DESTDIR)${prefix}/share/applications $(top_srcdir)/data/common/xplus4.desktop
+ desktop-file-install --dir=$(DESTDIR)${prefix}/share/applications $(top_srcdir)/data/common/xvic.desktop
+ desktop-file-install --dir=$(DESTDIR)${prefix}/share/applications $(top_srcdir)/data/common/xpet.desktop
+ desktop-file-install --dir=$(DESTDIR)${prefix}/share/applications $(top_srcdir)/data/common/xcbm2.desktop
+ desktop-file-install --dir=$(DESTDIR)${prefix}/share/applications $(top_srcdir)/data/common/xcbm5x0.desktop
+ desktop-file-install --dir=$(DESTDIR)${prefix}/share/applications $(top_srcdir)/data/common/vsid.desktop
# No `desktop-file-uninstall` exists, nor is there an uninstall option for
# `desktop-file-install` or `desktop-file-uninstall`, so a simple `rm` will
# have to do.
uninstall-desktop-files:
- if test -n "$(DESTDIR)"; then \
- rm -f $(DESTDIR)/share/applications/x64{,dtv,sc}.desktop ;\
- rm -f $(DESTDIR)/share/applications/xscpu64.desktop ;\
- rm -f $(DESTDIR)/share/applications/x128.desktop ;\
- rm -f $(DESTDIR)/share/applications/xplus4.desktop ;\
- rm -f $(DESTDIR)/share/applications/xpet.desktop ;\
- rm -f $(DESTDIR)/share/applications/xcbm{2,5x0}.desktop ;\
- rm -f $(DESTDIR)/share/applications/xvic.desktop ;\
- rm -f $(DESTDIR)/share/applications/vsid.desktop ;\
- else \
- rm -f /usr/share/applications/x64{,dtv,sc}.desktop ;\
- rm -f /usr/share/applications/xscpu64.desktop ;\
- rm -f /usr/share/applications/x128.desktop ;\
- rm -f /usr/share/applications/xplus4.desktop ;\
- rm -f /usr/share/applications/xpet.desktop ;\
- rm -f /usr/share/applications/xcbm{2,5x0}.desktop ;\
- rm -f /usr/share/applications/xvic.desktop ;\
- rm -f /usr/share/applications/vsid.desktop ;\
- fi
+ rm -f $(DESTDIR)${prefix}/share/applications/x64{,dtv,sc}.desktop
+ rm -f $(DESTDIR)${prefix}/share/applications/xscpu64.desktop
+ rm -f $(DESTDIR)${prefix}/share/applications/x128.desktop
+ rm -f $(DESTDIR)${prefix}/share/applications/xplus4.desktop
+ rm -f $(DESTDIR)${prefix}/share/applications/xpet.desktop
+ rm -f $(DESTDIR)${prefix}/share/applications/xcbm{2,5x0}.desktop
+ rm -f $(DESTDIR)${prefix}/share/applications/xvic.desktop
+ rm -f $(DESTDIR)${prefix}/share/applications/vsid.desktop
install-data-hook: install-icons install-desktop-files
-update-desktop-database
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-02-24 18:27:40
|
Revision: 45506
http://sourceforge.net/p/vice-emu/code/45506
Author: compyx
Date: 2025-02-24 18:27:38 +0000 (Mon, 24 Feb 2025)
Log Message:
-----------
XDG desktop files: handle make's DESTDIR to allow for staged installs
Update the calls to `desktop-file-install` to pass $DESTDIR as its `--dir`
argument so installing into a staging directory as a non-root user will place
the .desktop files into their proper location. The installation of icon files
with `xdg-icon-resource` into a staging directory will require some equivalent
logic to be applied (working on that).
Also add dashes in front of the calls to `update-desktop-database` to have
`make` ignore the failure of said program when not running as root.
See bug #2127.
Modified Paths:
--------------
trunk/vice/data/common/Makefile.am
Modified: trunk/vice/data/common/Makefile.am
===================================================================
--- trunk/vice/data/common/Makefile.am 2025-02-24 09:51:13 UTC (rev 45505)
+++ trunk/vice/data/common/Makefile.am 2025-02-24 18:27:38 UTC (rev 45506)
@@ -348,37 +348,65 @@
# this work for the canonical emulator names, alternate names will be a TODO.
install-desktop-files:
if SUPPORT_X64
- desktop-file-install $(top_srcdir)/data/common/x64.desktop
+ if test -n "$(DESTDIR)"; then \
+ desktop-file-install --dir=$(DESTDIR)/usr/share/applications $(top_srcdir)/data/common/x64.desktop ;\
+ else \
+ desktop-file-install $(top_srcdir)/data/common/x64.desktop ;\
+ fi
endif
- desktop-file-install $(top_srcdir)/data/common/x64sc.desktop
- desktop-file-install $(top_srcdir)/data/common/x64dtv.desktop
- desktop-file-install $(top_srcdir)/data/common/xscpu64.desktop
- desktop-file-install $(top_srcdir)/data/common/x128.desktop
- desktop-file-install $(top_srcdir)/data/common/xplus4.desktop
- desktop-file-install $(top_srcdir)/data/common/xvic.desktop
- desktop-file-install $(top_srcdir)/data/common/xpet.desktop
- desktop-file-install $(top_srcdir)/data/common/xcbm2.desktop
- desktop-file-install $(top_srcdir)/data/common/xcbm5x0.desktop
- desktop-file-install $(top_srcdir)/data/common/vsid.desktop
+ if test -n "$(DESTDIR)"; then \
+ desktop-file-install --dir=$(DESTDIR)/usr/share/applications $(top_srcdir)/data/common/x64sc.desktop ;\
+ desktop-file-install --dir=$(DESTDIR)/usr/share/applications $(top_srcdir)/data/common/x64dtv.desktop ;\
+ desktop-file-install --dir=$(DESTDIR)/usr/share/applications $(top_srcdir)/data/common/xscpu64.desktop ;\
+ desktop-file-install --dir=$(DESTDIR)/usr/share/applications $(top_srcdir)/data/common/x128.desktop ;\
+ desktop-file-install --dir=$(DESTDIR)/usr/share/applications $(top_srcdir)/data/common/xplus4.desktop ;\
+ desktop-file-install --dir=$(DESTDIR)/usr/share/applications $(top_srcdir)/data/common/xvic.desktop ;\
+ desktop-file-install --dir=$(DESTDIR)/usr/share/applications $(top_srcdir)/data/common/xpet.desktop ;\
+ desktop-file-install --dir=$(DESTDIR)/usr/share/applications $(top_srcdir)/data/common/xcbm2.desktop ;\
+ desktop-file-install --dir=$(DESTDIR)/usr/share/applications $(top_srcdir)/data/common/xcbm5x0.desktop ;\
+ desktop-file-install --dir=$(DESTDIR)/usr/share/applications $(top_srcdir)/data/common/vsid.desktop ;\
+ else \
+ desktop-file-install $(top_srcdir)/data/common/x64sc.desktop ;\
+ desktop-file-install $(top_srcdir)/data/common/x64dtv.desktop ;\
+ desktop-file-install $(top_srcdir)/data/common/xscpu64.desktop ;\
+ desktop-file-install $(top_srcdir)/data/common/x128.desktop ;\
+ desktop-file-install $(top_srcdir)/data/common/xplus4.desktop ;\
+ desktop-file-install $(top_srcdir)/data/common/xvic.desktop ;\
+ desktop-file-install $(top_srcdir)/data/common/xpet.desktop ;\
+ desktop-file-install $(top_srcdir)/data/common/xcbm2.desktop ;\
+ desktop-file-install $(top_srcdir)/data/common/xcbm5x0.desktop ;\
+ desktop-file-install $(top_srcdir)/data/common/vsid.desktop ;\
+ fi
# No `desktop-file-uninstall` exists, nor is there an uninstall option for
# `desktop-file-install` or `desktop-file-uninstall`, so a simple `rm` will
# have to do.
uninstall-desktop-files:
- rm -f /usr/share/applications/x64{,dtv,sc}.desktop
- rm -f /usr/share/applications/xscpu64.desktop
- rm -f /usr/share/applications/x128.desktop
- rm -f /usr/share/applications/xplus4.desktop
- rm -f /usr/share/applications/xpet.desktop
- rm -f /usr/share/applications/xcbm{2,5x0}.desktop
- rm -f /usr/share/applications/xvic.desktop
- rm -f /usr/share/applications/vsid.desktop
+ if test -n "$(DESTDIR)"; then \
+ rm -f $(DESTDIR)/share/applications/x64{,dtv,sc}.desktop ;\
+ rm -f $(DESTDIR)/share/applications/xscpu64.desktop ;\
+ rm -f $(DESTDIR)/share/applications/x128.desktop ;\
+ rm -f $(DESTDIR)/share/applications/xplus4.desktop ;\
+ rm -f $(DESTDIR)/share/applications/xpet.desktop ;\
+ rm -f $(DESTDIR)/share/applications/xcbm{2,5x0}.desktop ;\
+ rm -f $(DESTDIR)/share/applications/xvic.desktop ;\
+ rm -f $(DESTDIR)/share/applications/vsid.desktop ;\
+ else \
+ rm -f /usr/share/applications/x64{,dtv,sc}.desktop ;\
+ rm -f /usr/share/applications/xscpu64.desktop ;\
+ rm -f /usr/share/applications/x128.desktop ;\
+ rm -f /usr/share/applications/xplus4.desktop ;\
+ rm -f /usr/share/applications/xpet.desktop ;\
+ rm -f /usr/share/applications/xcbm{2,5x0}.desktop ;\
+ rm -f /usr/share/applications/xvic.desktop ;\
+ rm -f /usr/share/applications/vsid.desktop ;\
+ fi
install-data-hook: install-icons install-desktop-files
- update-desktop-database
+ -update-desktop-database
uninstall-hook: uninstall-icons uninstall-desktop-files
- update-desktop-database
+ -update-desktop-database
# if INSTALL_DESKTOP_FILES
endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-02-24 09:51:15
|
Revision: 45505
http://sourceforge.net/p/vice-emu/code/45505
Author: compyx
Date: 2025-02-24 09:51:13 +0000 (Mon, 24 Feb 2025)
Log Message:
-----------
Fix inclusion of icon files in dist tarball
All the Windows/Gtk/SDL/desktop-files/include-x64 conditionals in the Makefile
led to the icon files only ending up in dists configured for Gtk3. Should be
fixed now.
Modified Paths:
--------------
trunk/vice/data/common/Makefile.am
Modified: trunk/vice/data/common/Makefile.am
===================================================================
--- trunk/vice/data/common/Makefile.am 2025-02-21 16:44:20 UTC (rev 45504)
+++ trunk/vice/data/common/Makefile.am 2025-02-24 09:51:13 UTC (rev 45505)
@@ -380,8 +380,11 @@
uninstall-hook: uninstall-icons uninstall-desktop-files
update-desktop-database
+# if INSTALL_DESKTOP_FILES
endif
+# if USE_GTK3UI
+endif
# Everything goes into a source dist
EXTRA_DIST = $(icon_files) \
@@ -403,7 +406,11 @@
vice.gresource.xml
+if USE_GTK3UI
CLEANFILES = $(GRESOURCE_TARGET)
+else
+CLEANFILES =
+endif
if WINDOWS_COMPILE
# The *.ico and *.res files are currently generated in
@@ -433,5 +440,3 @@
xcbm5x0.res \
vsid.res
endif
-
-endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-02-21 16:44:22
|
Revision: 45504
http://sourceforge.net/p/vice-emu/code/45504
Author: compyx
Date: 2025-02-21 16:44:20 +0000 (Fri, 21 Feb 2025)
Log Message:
-----------
We're keeping the old code
Removed Paths:
-------------
branches/compyx/custom-joymaps/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-02-21 15:22:22
|
Revision: 45503
http://sourceforge.net/p/vice-emu/code/45503
Author: compyx
Date: 2025-02-21 15:22:20 +0000 (Fri, 21 Feb 2025)
Log Message:
-----------
Create branch for custom joystick mapping reimplementation
Added Paths:
-----------
branches/compyx/custom-joymaps/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-02-21 10:56:16
|
Revision: 45502
http://sourceforge.net/p/vice-emu/code/45502
Author: compyx
Date: 2025-02-21 10:56:14 +0000 (Fri, 21 Feb 2025)
Log Message:
-----------
Remove unused Windows-specific file
Remove file used for the old 'icon.png' chickenhead logo.
Removed Paths:
-------------
trunk/vice/src/arch/gtk3/data/win32/icon.rc
Deleted: trunk/vice/src/arch/gtk3/data/win32/icon.rc
===================================================================
--- trunk/vice/src/arch/gtk3/data/win32/icon.rc 2025-02-21 10:50:59 UTC (rev 45501)
+++ trunk/vice/src/arch/gtk3/data/win32/icon.rc 2025-02-21 10:56:14 UTC (rev 45502)
@@ -1,2 +0,0 @@
-id ICON "icon.ico"
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-02-21 10:51:00
|
Revision: 45501
http://sourceforge.net/p/vice-emu/code/45501
Author: compyx
Date: 2025-02-21 10:50:59 +0000 (Fri, 21 Feb 2025)
Log Message:
-----------
Fix icon linking on Windows for SDL
Seems we *did* already use icons for the Windows SDL UI, using the logic
in `gtk3/data/win32` to generate the icons. Updated build files to use the
proper `win32_res_files` rule in `data/common/Makefile.am` (when not building
headless).
Modified Paths:
--------------
trunk/vice/data/common/Makefile.am
trunk/vice/src/arch/gtk3/data/win32/Makefile.am
trunk/vice/src/arch/sdl/Makefile.am
Modified: trunk/vice/data/common/Makefile.am
===================================================================
--- trunk/vice/data/common/Makefile.am 2025-02-21 08:25:03 UTC (rev 45500)
+++ trunk/vice/data/common/Makefile.am 2025-02-21 10:50:59 UTC (rev 45501)
@@ -204,10 +204,12 @@
$(logo_files) \
$(font_files)
endif
+endif
+# Windows .res and .ico files (for Gtk3 and SDL)
if WINDOWS_COMPILE
+if !USE_HEADLESSUI
-# Windows .res files
if SUPPORT_X64
X64_RES=x64.res
else
@@ -239,10 +241,13 @@
xscpu64.ico: $(icons_win32_xscpu64)
xvic.ico: $(icons_win32_xvic)
+# if !USE_HEADLESSUI
+endif
# if WINDOWS_COMPILE
endif
+if USE_GTK3UI
# Generate gresource binary file, required by all Gtk3 emus
$(GRESOURCE_TARGET): $(GRESOURCE_XML)
glib-compile-resources --sourcedir $(top_srcdir) $< --target $@
@@ -251,7 +256,7 @@
if INSTALL_DESKTOP_FILES
-.PHONY: install-icons install-desktop-files uinstall-icons
+.PHONY: install-icons install-desktop-files uinstall-icons
# Install icon files in their proper place. The default context is 'apps' and
# the default mode is 'system' when running as root and 'user' when not running
Modified: trunk/vice/src/arch/gtk3/data/win32/Makefile.am
===================================================================
--- trunk/vice/src/arch/gtk3/data/win32/Makefile.am 2025-02-21 08:25:03 UTC (rev 45500)
+++ trunk/vice/src/arch/gtk3/data/win32/Makefile.am 2025-02-21 10:50:59 UTC (rev 45501)
@@ -1,4 +1,5 @@
if WINDOWS_COMPILE
+if USE_GTK3UI
# Create Windows .ico files
#
@@ -12,3 +13,4 @@
(cd $(top_builddir)/data/common && $(MAKE) win32_res_files)
endif
+endif
Modified: trunk/vice/src/arch/sdl/Makefile.am
===================================================================
--- trunk/vice/src/arch/sdl/Makefile.am 2025-02-21 08:25:03 UTC (rev 45500)
+++ trunk/vice/src/arch/sdl/Makefile.am 2025-02-21 10:50:59 UTC (rev 45501)
@@ -264,9 +264,9 @@
if WINDOWS_COMPILE
-# Use Gtk's icon stuff to generate icon sets
+# Generate icons
all:
- (cd ../gtk3/data/win32 && $(MAKE))
+ (cd $(top_builddir)/data/common && $(MAKE) win32_res_files)
endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-02-21 08:25:05
|
Revision: 45500
http://sourceforge.net/p/vice-emu/code/45500
Author: compyx
Date: 2025-02-21 08:25:03 +0000 (Fri, 21 Feb 2025)
Log Message:
-----------
Gtk3: move win32 icon generation into data/common/
Keep all icon-related data and logic inside data/common. Should make adding
icons on Windows to executables for other UIs (e.g. SDL) easier.
Modified Paths:
--------------
trunk/vice/data/common/Makefile.am
trunk/vice/src/arch/gtk3/data/win32/Makefile.am
Modified: trunk/vice/data/common/Makefile.am
===================================================================
--- trunk/vice/data/common/Makefile.am 2025-02-17 10:10:07 UTC (rev 45499)
+++ trunk/vice/data/common/Makefile.am 2025-02-21 08:25:03 UTC (rev 45500)
@@ -81,6 +81,76 @@
$(icons_256x256) \
$(icons_scalable)
+icons_win32_vsid = vice-vsid_16.png \
+ vice-vsid_24.png \
+ vice-vsid_32.png \
+ vice-vsid_48.png \
+ vice-vsid_64.png \
+ vice-vsid_256.png
+
+icons_win32_x128 = vice-x128_16.png \
+ vice-x128_24.png \
+ vice-x128_32.png \
+ vice-x128_48.png \
+ vice-x128_64.png \
+ vice-x128_256.png
+
+icons_win32_x64 = vice-x64_16.png \
+ vice-x64_24.png \
+ vice-x64_32.png \
+ vice-x64_48.png \
+ vice-x64_64.png \
+ vice-x64_256.png
+
+icons_win32_x64dtv = vice-x64dtv_16.png \
+ vice-x64dtv_24.png \
+ vice-x64dtv_32.png \
+ vice-x64dtv_48.png \
+ vice-x64dtv_64.png \
+ vice-x64dtv_256.png
+
+icons_win32_x64sc = vice-x64sc_16.png \
+ vice-x64sc_24.png \
+ vice-x64sc_32.png \
+ vice-x64sc_48.png \
+ vice-x64sc_64.png \
+ vice-x64sc_256.png
+
+icons_win32_xcbm2 = vice-xcbm2_16.png \
+ vice-xcbm2_24.png \
+ vice-xcbm2_32.png \
+ vice-xcbm2_48.png \
+ vice-xcbm2_64.png \
+ vice-xcbm2_256.png
+
+icons_win32_xpet = vice-xpet_16.png \
+ vice-xpet_24.png \
+ vice-xpet_32.png \
+ vice-xpet_48.png \
+ vice-xpet_64.png \
+ vice-xpet_256.png
+
+icons_win32_xplus4 = vice-xplus4_16.png \
+ vice-xplus4_24.png \
+ vice-xplus4_32.png \
+ vice-xplus4_48.png \
+ vice-xplus4_64.png \
+ vice-xplus4_256.png
+
+icons_win32_xscpu64 = vice-xscpu64_16.png \
+ vice-xscpu64_24.png \
+ vice-xscpu64_32.png \
+ vice-xscpu64_48.png \
+ vice-xscpu64_64.png \
+ vice-xscpu64_256.png
+
+icons_win32_xvic = vice-xvic_16.png \
+ vice-xvic_24.png \
+ vice-xvic_32.png \
+ vice-xvic_48.png \
+ vice-xvic_64.png \
+ vice-xvic_256.png
+
logo_files = CBM_Logo.svg \
vice-logo-black.svg
@@ -135,6 +205,44 @@
$(font_files)
endif
+if WINDOWS_COMPILE
+
+# Windows .res files
+if SUPPORT_X64
+X64_RES=x64.res
+else
+X64_RES=
+endif
+
+win32_res_files: vsid.res x128.res $(X64_RES) x64dtv.res x64sc.res xcbm2.res \
+ xcbm5x0.res xpet.res xplus4.res xscpu64.res xvic.res
+
+# Create Windows .ico files
+%.ico:
+ $(ICOTOOL) -c -o $@ $^
+
+# Create Windows .res files from .ico and .rc files
+%.res: $(top_srcdir)/data/common/%.rc %.ico
+ $(WINDRES) $< -O coff -o $@
+
+vsid.ico: $(icons_win32_vsid)
+x128.ico: $(icons_win32_x128)
+if SUPPORT_X64
+x64.ico: $(icons_win32_x64)
+endif
+x64dtv.ico: $(icons_win32_x64dtv)
+x64sc.ico: $(icons_win32_x64)
+xcbm2.ico: $(icons_win32_xcbm2)
+xcbm5x0.ico: $(icons_win32_xcbm2)
+xpet.ico: $(icons_win32_xpet)
+xplus4.ico: $(icons_win32_xplus4)
+xscpu64.ico: $(icons_win32_xscpu64)
+xvic.ico: $(icons_win32_xvic)
+
+# if WINDOWS_COMPILE
+endif
+
+
# Generate gresource binary file, required by all Gtk3 emus
$(GRESOURCE_TARGET): $(GRESOURCE_XML)
glib-compile-resources --sourcedir $(top_srcdir) $< --target $@
Modified: trunk/vice/src/arch/gtk3/data/win32/Makefile.am
===================================================================
--- trunk/vice/src/arch/gtk3/data/win32/Makefile.am 2025-02-17 10:10:07 UTC (rev 45499)
+++ trunk/vice/src/arch/gtk3/data/win32/Makefile.am 2025-02-21 08:25:03 UTC (rev 45500)
@@ -8,116 +8,7 @@
# not handling dependencies outside its tree very well (/src vs /data).
#
+all:
+ (cd $(top_builddir)/data/common && $(MAKE) win32_res_files)
-# TODO: check if we can use patsubst here, to simplify the rules a bit.
-
-X64SC_ICONS = $(top_srcdir)/data/common/vice-x64_16.png \
- $(top_srcdir)/data/common/vice-x64_24.png \
- $(top_srcdir)/data/common/vice-x64_32.png \
- $(top_srcdir)/data/common/vice-x64_48.png \
- $(top_srcdir)/data/common/vice-x64_64.png \
- $(top_srcdir)/data/common/vice-x64_256.png
-
-if SUPPORT_X64
-X64_ICONS = $(X64SC_ICONS)
endif
-
-X64DTV_ICONS = $(top_srcdir)/data/common/vice-x64dtv_16.png \
- $(top_srcdir)/data/common/vice-x64dtv_24.png \
- $(top_srcdir)/data/common/vice-x64dtv_32.png \
- $(top_srcdir)/data/common/vice-x64dtv_48.png \
- $(top_srcdir)/data/common/vice-x64dtv_64.png \
- $(top_srcdir)/data/common/vice-x64dtv_256.png
-
-XSCPU64_ICONS = $(top_srcdir)/data/common/vice-xscpu64_16.png \
- $(top_srcdir)/data/common/vice-xscpu64_24.png \
- $(top_srcdir)/data/common/vice-xscpu64_32.png \
- $(top_srcdir)/data/common/vice-xscpu64_48.png \
- $(top_srcdir)/data/common/vice-xscpu64_64.png \
- $(top_srcdir)/data/common/vice-xscpu64_256.png
-
-X128_ICONS = $(top_srcdir)/data/common/vice-x128_16.png \
- $(top_srcdir)/data/common/vice-x128_24.png \
- $(top_srcdir)/data/common/vice-x128_32.png \
- $(top_srcdir)/data/common/vice-x128_48.png \
- $(top_srcdir)/data/common/vice-x128_64.png \
- $(top_srcdir)/data/common/vice-x128_256.png
-
-XVIC_ICONS = $(top_srcdir)/data/common/vice-xvic_16.png \
- $(top_srcdir)/data/common/vice-xvic_24.png \
- $(top_srcdir)/data/common/vice-xvic_32.png \
- $(top_srcdir)/data/common/vice-xvic_48.png \
- $(top_srcdir)/data/common/vice-xvic_64.png \
- $(top_srcdir)/data/common/vice-xvic_256.png
-
-XPLUS4_ICONS = $(top_srcdir)/data/common/vice-xplus4_16.png \
- $(top_srcdir)/data/common/vice-xplus4_24.png \
- $(top_srcdir)/data/common/vice-xplus4_32.png \
- $(top_srcdir)/data/common/vice-xplus4_48.png \
- $(top_srcdir)/data/common/vice-xplus4_64.png \
- $(top_srcdir)/data/common/vice-xplus4_256.png
-
-XPET_ICONS = $(top_srcdir)/data/common/vice-xpet_16.png \
- $(top_srcdir)/data/common/vice-xpet_24.png \
- $(top_srcdir)/data/common/vice-xpet_32.png \
- $(top_srcdir)/data/common/vice-xpet_48.png \
- $(top_srcdir)/data/common/vice-xpet_64.png \
- $(top_srcdir)/data/common/vice-xpet_256.png
-
-XCBM2_ICONS = $(top_srcdir)/data/common/vice-xcbm2_16.png \
- $(top_srcdir)/data/common/vice-xcbm2_24.png \
- $(top_srcdir)/data/common/vice-xcbm2_32.png \
- $(top_srcdir)/data/common/vice-xcbm2_48.png \
- $(top_srcdir)/data/common/vice-xcbm2_64.png \
- $(top_srcdir)/data/common/vice-xcbm2_256.png
-
-XCBM5x0_ICONS = $(XCBM2_ICONS)
-
-VSID_ICONS = $(top_srcdir)/data/common/vice-vsid_16.png \
- $(top_srcdir)/data/common/vice-vsid_24.png \
- $(top_srcdir)/data/common/vice-vsid_32.png \
- $(top_srcdir)/data/common/vice-vsid_48.png \
- $(top_srcdir)/data/common/vice-vsid_64.png \
- $(top_srcdir)/data/common/vice-vsid_256.png
-
-
-# Do we use the old x64 emu?
-if SUPPORT_X64
-X64_RES_FILE = x64.res
-else
-X64_RES_FILE =
-endif
-
-
-all: $(X64_RES_FILE) x64sc.res x64dtv.res xscpu64.res x128.res xvic.res xplus4.res xpet.res xcbm2.res xcbm5x0.res vsid.res
-
-
-# Generic rule to create Windows .ico files
-%.ico:
- $(ICOTOOL) -c -o $(top_builddir)/data/common/$@ $^
-
-
-# Generic rule to create Windows .res files from .ico and .rc files
-#
-# TODO: try to simplify
-#
-%.res: $(top_srcdir)/data/common/%.rc %.ico
- $(WINDRES) $< -O coff -o $(top_builddir)/data/common/$@ -I $(top_builddir)/data/common
-
-
-# Icon file dependencies for each emu
-if SUPPORT_X64
-x64.ico: $(X64_ICONS)
-endif
-x64sc.ico: $(X64SC_ICONS)
-x64dtv.ico: $(X64DTV_ICONS)
-xscpu64.ico: $(XSCPU64_ICONS)
-x128.ico: $(X128_ICONS)
-xvic.ico: $(XVIC_ICONS)
-xplus4.ico: $(XPLUS4_ICONS)
-xpet.ico: $(XPET_ICONS)
-xcbm2.ico: $(XCBM2_ICONS)
-xcbm5x0.ico: $(XCBM5x0_ICONS)
-vsid.ico: $(VSID_ICONS)
-
-endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-02-17 10:10:09
|
Revision: 45499
http://sourceforge.net/p/vice-emu/code/45499
Author: compyx
Date: 2025-02-17 10:10:07 +0000 (Mon, 17 Feb 2025)
Log Message:
-----------
Limit number of icon files installed
Instead of installing all icon files in data/common/, install only those
required, either by VICE itself or the OS'es guidelines.
For SDL the 256x256 PNG icons are installed, except on Windows for SDL 1.x,
where the 32x32 icons are installed (as suggested by the SDL docs).
For Gtk3 on Unix the 32x32, 48x48, 64x64 and 256x256 icons are installed,
either in their correct place when configured with `--enable-desktop-files`
or in $PREFIX/share/vice otherwise.
For Gtk3 on Windows the suggested icon sizes are used (16x16, 24x24, 32x32,
48x48, 64x64 and 256x256), linked with the executable using `icotool` and
`windres`.
Modified Paths:
--------------
trunk/vice/data/common/Makefile.am
Modified: trunk/vice/data/common/Makefile.am
===================================================================
--- trunk/vice/data/common/Makefile.am 2025-02-16 11:18:27 UTC (rev 45498)
+++ trunk/vice/data/common/Makefile.am 2025-02-17 10:10:07 UTC (rev 45499)
@@ -105,37 +105,36 @@
xcbm5x0.desktop \
vsid.desktop
-# Don't install icon files into VICE data dir if we have --enable-desktop-files,
-# we use install hooks with xdg-icon-resource for those:
+
+if USE_SDLUI
+if WINDOWS_COMPILE
+# SDL 1.2 says to use 32x32 icons on Windows
+common_DATA = $(icons_32x32)
+else
+common_DATA = $(icons_256x256)
+endif
+endif
+
+if USE_SDL2UI
+# 256x256 icons are fine for SDL 2.x for all OSes
+common_DATA = $(icons_256x256)
+endif
+
+if USE_GTK3UI
if INSTALL_DESKTOP_FILES
+# We install icons via xdg-icon-resource, so don't install any icons directly
common_DATA = $(logo_files) \
$(font_files)
else
-common_DATA = $(icon_files) \
+common_DATA = $(icons_32x32) \
+ $(icons_48x48) \
+ $(icons_64x64) \
+ $(icons_256x256) \
+ $(icons_scalable) \
$(logo_files) \
$(font_files)
endif
-EXTRA_DIST = $(icon_files) \
- $(logo_files) \
- $(font_files) \
- $(desktop_files) \
- PetMe-FreeLicense.txt \
- x64.rc \
- x64sc.rc \
- x64dtv.rc \
- xscpu64.rc \
- x128.rc \
- xvic.rc \
- xplus4.rc \
- xpet.rc \
- xcbm2.rc \
- xcbm5x0.rc \
- vsid.rc \
- vice.gresource.xml
-
-
-if USE_GTK3UI
# Generate gresource binary file, required by all Gtk3 emus
$(GRESOURCE_TARGET): $(GRESOURCE_XML)
glib-compile-resources --sourcedir $(top_srcdir) $< --target $@
@@ -270,11 +269,34 @@
endif
+
+# Everything goes into a source dist
+EXTRA_DIST = $(icon_files) \
+ $(logo_files) \
+ $(font_files) \
+ $(desktop_files) \
+ PetMe-FreeLicense.txt \
+ x64.rc \
+ x64sc.rc \
+ x64dtv.rc \
+ xscpu64.rc \
+ x128.rc \
+ xvic.rc \
+ xplus4.rc \
+ xpet.rc \
+ xcbm2.rc \
+ xcbm5x0.rc \
+ vsid.rc \
+ vice.gresource.xml
+
+
+CLEANFILES = $(GRESOURCE_TARGET)
+
+if WINDOWS_COMPILE
# The *.ico and *.res files are currently generated in
# src/arch/gtk3/data/win32/Makefile.am, but the plan is to move that to here
# to also be able to generate the files for linking with SDL binaries on Win32
-CLEANFILES = \
- $(GRESOURCE_TARGET) \
+CLEANFILES += \
x64.ico \
x64sc.ico \
x64dtv.ico \
@@ -297,5 +319,6 @@
xcbm2.res \
xcbm5x0.res \
vsid.res
+endif
endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-02-16 11:18:28
|
Revision: 45498
http://sourceforge.net/p/vice-emu/code/45498
Author: compyx
Date: 2025-02-16 11:18:27 +0000 (Sun, 16 Feb 2025)
Log Message:
-----------
Split icon files in into lists per size
List icon files in the Makefile per size/scalable to allow for more fine-grained
control over which files are installed per UI and OS.
Modified Paths:
--------------
trunk/vice/data/common/Makefile.am
Modified: trunk/vice/data/common/Makefile.am
===================================================================
--- trunk/vice/data/common/Makefile.am 2025-02-16 10:56:33 UTC (rev 45497)
+++ trunk/vice/data/common/Makefile.am 2025-02-16 11:18:27 UTC (rev 45498)
@@ -3,70 +3,84 @@
GRESOURCE_TARGET = $(builddir)/vice.gresource
GRESOURCE_XML = $(srcdir)/vice.gresource.xml
-icon_files = vice-x128_16.png \
- vice-x128_24.png \
- vice-x128_32.png \
- vice-x128_48.png \
- vice-x128_64.png \
- vice-x128_256.png \
- vice-x128_1024.svg \
- vice-x64_16.png \
- vice-x64_24.png \
- vice-x64_32.png \
- vice-x64_48.png \
- vice-x64_64.png \
- vice-x64_256.png \
- vice-x64_1024.svg \
- vice-xcbm2_16.png \
- vice-xcbm2_24.png \
- vice-xcbm2_32.png \
- vice-xcbm2_48.png \
- vice-xcbm2_64.png \
- vice-xcbm2_256.png \
- vice-xcbm2_1024.svg \
- vice-x64dtv_16.png \
- vice-x64dtv_24.png \
- vice-x64dtv_32.png \
- vice-x64dtv_48.png \
- vice-x64dtv_64.png \
- vice-x64dtv_256.png \
- vice-x64dtv_1024.svg \
- vice-xpet_16.png \
- vice-xpet_24.png \
- vice-xpet_32.png \
- vice-xpet_48.png \
- vice-xpet_64.png \
- vice-xpet_256.png \
- vice-xpet_1024.svg \
- vice-xplus4_16.png \
- vice-xplus4_24.png \
- vice-xplus4_32.png \
- vice-xplus4_48.png \
- vice-xplus4_64.png \
- vice-xplus4_256.png \
- vice-xplus4_1024.svg \
- vice-xscpu64_16.png \
- vice-xscpu64_24.png \
- vice-xscpu64_32.png \
- vice-xscpu64_48.png \
- vice-xscpu64_64.png \
- vice-xscpu64_256.png \
- vice-xscpu64_1024.svg \
- vice-vsid_16.png \
- vice-vsid_24.png \
- vice-vsid_32.png \
- vice-vsid_48.png \
- vice-vsid_64.png \
- vice-vsid_256.png \
- vice-vsid_1024.svg \
- vice-xvic_16.png \
- vice-xvic_24.png \
- vice-xvic_32.png \
- vice-xvic_48.png \
- vice-xvic_64.png \
- vice-xvic_256.png \
- vice-xvic_1024.svg
+icons_16x16 = vice-vsid_16.png \
+ vice-x128_16.png \
+ vice-x64_16.png \
+ vice-x64dtv_16.png \
+ vice-xcbm2_16.png \
+ vice-xpet_16.png \
+ vice-xplus4_16.png \
+ vice-xscpu64_16.png \
+ vice-xvic_16.png
+icons_24x24 = vice-vsid_24.png \
+ vice-x128_24.png \
+ vice-x64_24.png \
+ vice-x64dtv_24.png \
+ vice-xcbm2_24.png \
+ vice-xpet_24.png \
+ vice-xplus4_24.png \
+ vice-xscpu64_24.png \
+ vice-xvic_24.png
+
+icons_32x32 = vice-vsid_32.png \
+ vice-x128_32.png \
+ vice-x64_32.png \
+ vice-x64dtv_32.png \
+ vice-xcbm2_32.png \
+ vice-xpet_32.png \
+ vice-xplus4_32.png \
+ vice-xscpu64_32.png \
+ vice-xvic_32.png
+
+icons_48x48 = vice-vsid_48.png \
+ vice-x128_48.png \
+ vice-x64_48.png \
+ vice-x64dtv_48.png \
+ vice-xcbm2_48.png \
+ vice-xpet_48.png \
+ vice-xplus4_48.png \
+ vice-xscpu64_48.png \
+ vice-xvic_48.png
+
+icons_64x64 = vice-vsid_64.png \
+ vice-x128_64.png \
+ vice-x64_64.png \
+ vice-x64dtv_64.png \
+ vice-xcbm2_64.png \
+ vice-xpet_64.png \
+ vice-xplus4_64.png \
+ vice-xscpu64_64.png \
+ vice-xvic_64.png
+
+icons_256x256 = vice-vsid_256.png \
+ vice-x128_256.png \
+ vice-x64_256.png \
+ vice-x64dtv_256.png \
+ vice-xcbm2_256.png \
+ vice-xpet_256.png \
+ vice-xplus4_256.png \
+ vice-xscpu64_256.png \
+ vice-xvic_256.png
+
+icons_scalable = vice-vsid_1024.svg \
+ vice-x128_1024.svg \
+ vice-x64_1024.svg \
+ vice-x64dtv_1024.svg \
+ vice-xcbm2_1024.svg \
+ vice-xpet_1024.svg \
+ vice-xplus4_1024.svg \
+ vice-xscpu64_1024.svg \
+ vice-xvic_1024.svg
+
+icon_files = $(icons_16x16) \
+ $(icons_24x24) \
+ $(icons_32x32) \
+ $(icons_48x48) \
+ $(icons_64x64) \
+ $(icons_256x256) \
+ $(icons_scalable)
+
logo_files = CBM_Logo.svg \
vice-logo-black.svg
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-02-16 10:56:35
|
Revision: 45497
http://sourceforge.net/p/vice-emu/code/45497
Author: compyx
Date: 2025-02-16 10:56:33 +0000 (Sun, 16 Feb 2025)
Log Message:
-----------
Also commit the Makefile.am for the xpet SVG icons commit
Modified Paths:
--------------
trunk/vice/data/common/Makefile.am
Modified: trunk/vice/data/common/Makefile.am
===================================================================
--- trunk/vice/data/common/Makefile.am 2025-02-16 10:54:57 UTC (rev 45496)
+++ trunk/vice/data/common/Makefile.am 2025-02-16 10:56:33 UTC (rev 45497)
@@ -37,7 +37,6 @@
vice-xpet_48.png \
vice-xpet_64.png \
vice-xpet_256.png \
- vice-xpet_256.svg \
vice-xpet_1024.svg \
vice-xplus4_16.png \
vice-xplus4_24.png \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <co...@us...> - 2025-02-16 10:54:58
|
Revision: 45496
http://sourceforge.net/p/vice-emu/code/45496
Author: compyx
Date: 2025-02-16 10:54:57 +0000 (Sun, 16 Feb 2025)
Log Message:
-----------
Icons: xpet SVG: remove 1024x1024, rename 256x256 to 1024x1024
The 1024x1024 SVG icon used an incorrect font, and the 256x256 SVG icon used
the correct one, and is actually 1024x1024. Partially solves the mystery of the
extra 256x256 xpet SVG icon ;)
Added Paths:
-----------
trunk/vice/data/common/vice-xpet_1024.svg
Removed Paths:
-------------
trunk/vice/data/common/vice-xpet_1024.svg
trunk/vice/data/common/vice-xpet_256.svg
Deleted: trunk/vice/data/common/vice-xpet_1024.svg
===================================================================
--- trunk/vice/data/common/vice-xpet_1024.svg 2025-02-14 19:14:50 UTC (rev 45495)
+++ trunk/vice/data/common/vice-xpet_1024.svg 2025-02-16 10:54:57 UTC (rev 45496)
@@ -1,130 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 24.2.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- viewBox="0 0 1024 1024" style="enable-background:new 0 0 1024 1024;" xml:space="preserve">
-<style type="text/css">
- .st0{display:none;}
- .st1{display:inline;}
- .st2{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_1_);}
- .st3{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_2_);}
- .st4{fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_3_);}
- .st5{display:inline;fill-rule:evenodd;clip-rule:evenodd;fill:#8A88A3;}
- .st6{display:inline;fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_4_);}
- .st7{fill:#FFFFFF;}
- .st8{fill-rule:evenodd;clip-rule:evenodd;}
- .st9{fill-rule:evenodd;clip-rule:evenodd;fill:#3A3A3A;}
- .st10{display:inline;fill:#FFFFFF;}
- .st11{display:inline;opacity:0.3;fill-rule:evenodd;clip-rule:evenodd;fill:url(#SVGID_5_);}
- .st12{fill-rule:evenodd;clip-rule:evenodd;fill:#3D3D3D;}
- .st13{fill-rule:evenodd;clip-rule:evenodd;fill:#595959;}
- .st14{opacity:0.5;}
- .st15{fill:none;stroke:#000000;stroke-width:20;stroke-miterlimit:10;}
- .st16{fill:none;stroke:#FFFFFF;stroke-width:20;stroke-miterlimit:10;}
- .st17{font-family:'EurostileLTStd-BoldEx2';}
- .st18{font-size:175px;}
- .st19{fill:none;stroke:#000000;stroke-miterlimit:10;}
-</style>
-<g id="Layer_1" class="st0">
- <g class="st1">
- <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="334.257" y1="150.177" x2="400.9237" y2="1072.8436">
- <stop offset="0" style="stop-color:#68372B"/>
- <stop offset="1" style="stop-color:#352879"/>
- </linearGradient>
- <path class="st2" d="M584.8,342.9v-187C547,146,521.1,142,483.3,142c-198.9,0-372,165.1-372,370c0,212.8,175,370,374,370
- c35.8,0,55.7-4,99.4-15.9V675.1C541,697,519.1,703,483.3,703c-109.4,0-194.9-91.5-194.9-194.9c0-105.4,83.5-194.9,192.9-194.9
- C519.1,313.1,550.9,323,584.8,342.9L584.8,342.9z"/>
- <linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="731.5695" y1="121.4694" x2="798.2362" y2="1044.1361">
- <stop offset="0" style="stop-color:#68372B"/>
- <stop offset="1" style="stop-color:#352879"/>
- </linearGradient>
- <polygon class="st3" points="912.7,353.1 594.4,353.1 594.4,498.3 769.5,498.3 "/>
- <linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="713.7704" y1="122.7555" x2="780.4371" y2="1045.4221">
- <stop offset="0" style="stop-color:#68372B"/>
- <stop offset="1" style="stop-color:#352879"/>
- </linearGradient>
- <polygon class="st4" points="771.5,528.1 594.4,528.1 594.4,673.3 912.7,673.3 771.5,528.1 "/>
- </g>
-</g>
-<g id="Layer_12" class="st0">
- <rect class="st5" width="1024" height="1024"/>
-</g>
-<g id="Layer_11_copy" class="st0">
- <linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="512" y1="6.8406" x2="512" y2="334.6445">
- <stop offset="0" style="stop-color:#68372B"/>
- <stop offset="0.7388" style="stop-color:#352879"/>
- </linearGradient>
- <path class="st6" d="M267.1,1010H139.3C70.1,1010,14,953.9,14,884.7V139.3C14,70.1,70.1,14,139.3,14h745.5
- c69.2,0,125.3,56.1,125.3,125.3v745.5c0,69.2-56.1,125.3-125.3,125.3H756.7"/>
- <g class="st1">
- <polygon class="st7" points="641.3,914 641.3,657 524,657 524,798.4 "/>
- <polygon class="st7" points="500,800 500,657 382.7,657 382.7,914 500,800 "/>
- </g>
-</g>
-<g id="Layer_11_copy_2" class="st0">
- <g class="st1">
- <path class="st8" d="M267.1,1010H139.3C70.1,1010,14,953.9,14,884.7V139.3C14,70.1,70.1,14,139.3,14h745.5
- c69.2,0,125.3,56.1,125.3,125.3v745.5c0,69.2-56.1,125.3-125.3,125.3H756.7H267.1z"/>
- <path class="st9" d="M14,497V139.3C14,70.1,70.1,14,139.3,14H512L14,497z"/>
- </g>
- <polygon class="st10" points="639.3,896 639.3,643 523.8,643 523.8,782.1 "/>
- <polygon class="st10" points="500.2,783.7 500.2,643 384.7,643 384.7,896 500.2,783.7 "/>
- <linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="-509" y1="70.593" x2="-509" y2="920.8939">
- <stop offset="4.442563e-02" style="stop-color:#68372B"/>
- <stop offset="0.7388" style="stop-color:#352879"/>
- </linearGradient>
- <path class="st11" d="M-741.6,970H-863c-65.7,0-119-53.3-119-119V143c0-65.7,53.3-119,119-119H-155c65.7,0,119,53.3,119,119V851
- c0,65.7-53.3,119-119,119h-121.6"/>
-</g>
-<g id="Layer_11_copy_3">
- <path class="st12" d="M267.1,1010H139.3C70.1,1010,14,953.9,14,884.7V139.3C14,70.1,70.1,14,139.3,14h745.5
- c69.2,0,125.3,56.1,125.3,125.3v745.5c0,69.2-56.1,125.3-125.3,125.3H756.7H267.1z"/>
- <path class="st13" d="M267.1,1010H139.3C70.1,1010,14,953.9,14,884.7V809h996v75.7c0,69.2-56.1,125.3-125.3,125.3H756.7H267.1z"/>
- <g class="st14">
- <line class="st15" x1="14" y1="620" x2="1010" y2="620"/>
- <line class="st16" x1="14" y1="640" x2="1010" y2="640"/>
- <line class="st15" x1="14" y1="660" x2="1010" y2="660"/>
- <line class="st16" x1="14" y1="680" x2="1010" y2="680"/>
- <line class="st15" x1="14" y1="700" x2="1010" y2="700"/>
- <line class="st16" x1="14" y1="720" x2="1010" y2="720"/>
- <line class="st15" x1="14" y1="740" x2="1010" y2="740"/>
- <line class="st16" x1="14" y1="760" x2="1010" y2="760"/>
- <line class="st15" x1="14" y1="780" x2="1010" y2="780"/>
- <line class="st16" x1="14" y1="800" x2="1010" y2="800"/>
- </g>
-</g>
-<g id="Layer_11" class="st0">
-</g>
-<g id="VIC20" class="st0">
- <text transform="matrix(1 0 0 1 118.6028 556.6257)" class="st10 st17 st18">VIC20</text>
-</g>
-<g id="Plus4" class="st0">
- <text transform="matrix(1 0 0 1 168.3914 556.6257)" class="st10 st17 st18">Plus4</text>
-</g>
-<g id="DTV" class="st0">
- <text transform="matrix(1 0 0 1 243.9006 556.6257)" class="st10 st17 st18">DTV</text>
-</g>
-<g id="C64" class="st0">
- <text transform="matrix(1 0 0 1 246.177 556.6257)" class="st10 st17 st18">C64</text>
-</g>
-<g id="SID" class="st0">
- <text transform="matrix(1 0 0 1 289.3142 556.6257)" class="st10 st17 st18">SID</text>
-</g>
-<g id="PET">
- <text transform="matrix(1 0 0 1 265.6008 556.6257)" class="st7 st17 st18">PET</text>
-</g>
-<g id="CBM2" class="st0">
- <text transform="matrix(1 0 0 1 122.9768 556.6257)" class="st10 st17 st18">CBM2</text>
-</g>
-<g id="SCPU" class="st0">
- <text transform="matrix(1 0 0 1 149.052 556.6257)" class="st10 st17 st18">SCPU</text>
-</g>
-<g id="C128" class="st0">
- <text transform="matrix(1 0 0 1 159.7278 556.6257)" class="st10 st17 st18">C128</text>
-</g>
-<g id="Layer_4" class="st0">
- <g class="st1">
- <line class="st19" x1="134.8" y1="0" x2="134.8" y2="1024"/>
- <line class="st19" x1="889.2" y1="0" x2="889.2" y2="1024"/>
- </g>
-</g>
-</svg>
Copied: trunk/vice/data/common/vice-xpet_1024.svg (from rev 45495, trunk/vice/data/common/vice-xpet_256.svg)
===================================================================
--- trunk/vice/data/common/vice-xpet_1024.svg (rev 0)
+++ trunk/vice/data/common/vice-xpet_1024.svg 2025-02-16 10:54:57 UTC (rev 45496)
@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 24.2.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 1024 1024" style="enable-background:new 0 0 1024 1024;" xml:space="preserve">
+<style type="text/css">
+ .st0{fill-rule:evenodd;clip-rule:evenodd;fill:#3D3D3D;}
+ .st1{fill-rule:evenodd;clip-rule:evenodd;fill:#595959;}
+ .st2{fill:#2B2B2B;}
+ .st3{fill:#7C7C7C;}
+ .st4{display:none;}
+ .st5{display:inline;}
+ .st6{fill:#FFFFFF;}
+</style>
+<g id="Layer_11_copy_3">
+ <path class="st0" d="M267.1,1010h-63.9h-63.9c-34.6,0-65.9-14-88.6-36.7C28,950.6,14,919.3,14,884.7V512V139.3
+ c0-34.6,14-65.9,36.7-88.6s54-36.7,88.6-36.7H512h372.7c34.6,0,65.9,14,88.6,36.7c22.7,22.7,36.7,54,36.7,88.6V512v372.7
+ c0,34.6-14,65.9-36.7,88.6c-22.7,22.7-54,36.7-88.6,36.7h-64h-64H511.9H267.1z"/>
+ <path class="st1" d="M267.1,1010H139.3C70.1,1010,14,953.9,14,884.7V809h996v75.7c0,69.2-56.1,125.3-125.3,125.3H756.7H267.1z"/>
+ <g>
+ <g>
+ <rect x="14" y="610" class="st2" width="996" height="20"/>
+ <rect x="14" y="630" class="st3" width="996" height="20"/>
+ </g>
+ <g>
+ <rect x="14" y="650" class="st2" width="996" height="20"/>
+ <rect x="14" y="670" class="st3" width="996" height="20"/>
+ </g>
+ <g>
+ <rect x="14" y="690" class="st2" width="996" height="20"/>
+ <rect x="14" y="710" class="st3" width="996" height="20"/>
+ </g>
+ <g>
+ <rect x="14" y="730" class="st2" width="996" height="20"/>
+ <rect x="14" y="750" class="st3" width="996" height="20"/>
+ </g>
+ <g>
+ <rect x="14" y="770" class="st2" width="996" height="20"/>
+ <rect x="14" y="790" class="st3" width="996" height="20"/>
+ </g>
+ </g>
+</g>
+<g id="VIC20" class="st4">
+ <g class="st5">
+ <path class="st6" d="M130.7,433.5h20.7H172l24.1,45.7l24.1,45.7l24.1-45.7l24.1-45.7h20.7h20.7l-33.1,61.5l-33.1,61.5h-23.3h-23.3
+ l-33.1-61.5L130.7,433.5z"/>
+ <path class="st6" d="M325.2,433.5H344h18.9v61.5v61.5H344h-18.9v-61.5V433.5z"/>
+ <path class="st6" d="M387.7,476.7c0-18,5.1-29.2,14.4-35.8s22.9-8.8,39.9-8.8h22.2h22.2c26.9,0,42,2.9,50.4,10.1
+ s10.1,18.8,9.9,36.3h-18.9h-18.9v-1.7v-1.7c0-4.4-1.6-7.3-4.6-9s-7.4-2.4-13-2.4h-20.6h-20.6c-9.9,0-15.9,2.3-19.3,6.6
+ s-4.4,10.4-4.4,18.1v6.6v6.6c0,8.9,0.9,15.1,4.1,19s8.6,5.6,17.5,5.6h20.1h20.1c8.5,0,14-0.4,17.4-2.8s4.7-6.6,4.7-14.2h18.9h18.9
+ v5.8v5.8c0,10.4-1.9,19.6-8.5,26.3s-18,10.8-36.9,10.8h-30.4H442c-17,0-30.6-2.1-39.9-8.8s-14.4-17.8-14.4-35.8v-18.4V476.7z"/>
+ <path class="st6" d="M570.1,514.8c0-7.6,2.5-13.9,8-18.5s14-7.5,26.2-8.4l21.6-1.4l21.6-1.4c13.8-0.9,21.1-1.4,25-3.3
+ s4.4-5,4.4-11c0-5-0.3-8.1-3.5-9.9s-9.6-2.4-21.6-2.4h-12.5h-12.5c-8,0-13.2,0.6-16.4,2.8s-4.5,6-4.5,12.3v2.6v2.6H588h-17.8v-7.2
+ v-7.2c0-12.2,3.6-20.3,11.4-25.4s19.9-7.1,36.9-7.1h24.8h24.8c17.7,0,28.8,2.6,35.5,8.5s9,14.9,9,27.7c0,18.1-1.7,28.7-8.8,35
+ s-19.8,8.5-41.8,9.7l-19.5,1l-19.5,1c-7.9,0.4-12.5,1.4-15,3.7s-3.2,5.8-3.2,11.3h54.7h54.7v13.3v13.3h-72.1h-72.1v-20.9V514.8z"
+ />
+ <path class="st6" d="M734.2,480.5c0-18.7,3.4-30.8,11.8-38.2s21.9-10.1,42.1-10.1h22.1h22.1c20.1,0,33.6,2.7,42.1,10.1
+ s11.8,19.5,11.8,38.2v17.2v17.2c0,16-3.7,26.8-11,33.6s-18.3,9.6-33,9.6h-32h-32c-14.7,0-25.7-2.8-33-9.6s-11-17.6-11-33.6v-17.2
+ V480.5z M770.9,508.3c0,6.4,1,11.1,4.2,14.3s8.7,4.7,17.5,4.7h17.5h17.5c8.8,0,14.3-1.6,17.5-4.7s4.2-7.9,4.2-14.3v-13.3v-13.3
+ c0-6.4-1-11.1-4.2-14.3s-8.7-4.7-17.5-4.7h-17.5h-17.5c-8.8,0-14.3,1.6-17.5,4.7s-4.2,7.9-4.2,14.3v13.3V508.3z"/>
+ </g>
+</g>
+<g id="Plus4" class="st4">
+ <g class="st5">
+ <path class="st6" d="M141.9,414.7h59.3h59.3c20.7,0,33.5,5.2,41.2,13.9s10.2,20.8,10.2,34.7v6.1v6.1c0,10.6-2.3,22-8.5,30.7
+ S287.2,521,271.8,521h-43.2h-43.2v17.8v17.8h-21.8h-21.8v-71V414.7z M185.4,485.7h33.8H253c5.1,0,8.6-1.7,10.9-4.4
+ s3.2-6.5,3.2-10.7v-2.7v-2.7c0-4.8-1.2-8.6-4-11.1s-7.3-3.9-13.8-3.9h-31.9h-31.9v17.8V485.7z"/>
+ <path class="st6" d="M335.7,414.7h18.8h18.8v71v71h-18.8h-18.8v-71V414.7z"/>
+ <path class="st6" d="M535.2,556.6h-18.8h-18.8v-8v-8h-0.2h-0.2c-3.3,7-8.3,11.4-14.9,14s-15,3.6-25.1,3.6
+ c-11.7,0-25.6-0.2-36.7-5.9s-19.2-16.7-19.2-38.2v-28.7v-28.7h18.8H439v28.7v28.7c0,4.9,2,8.6,6,11s10.1,3.7,18.3,3.7h4.3h4.3
+ c8,0,14.5-1.9,18.9-5.5s6.8-9.1,6.8-16.2v-25.2v-25.2h18.8h18.8v50V556.6z"/>
+ <path class="st6" d="M596.2,525.5c0,2.7,0.5,5,3.7,6.7s9,2.5,19.7,2.5h6.7h6.7c8.9,0,14.5-0.3,17.9-1.4s4.5-3,4.5-6
+ c0-2.9-0.7-5-3.1-6.3s-6.5-1.9-13.1-1.9h-17.6h-17.6c-17.5-0.1-28.9-2.1-35.9-7.4s-9.6-14.1-9.6-27.9c0-12.4,5-19.6,13.2-23.6
+ s19.7-5,32.6-5h13.1h13.1c24.6,0,39.1,1.7,47.4,6.4s10.6,12.2,10.8,24h-18.8h-18.8c-1-2.9-2.4-4.7-6.3-5.6s-10.5-1.2-21.7-1.2
+ c-10.9,0-17.3,0.1-21.1,1.2s-4.8,2.9-4.8,6.3c0,2.2,0.7,3.6,3.9,4.6s8.8,1.3,18.6,1.3h13h13c22.5,0,34.6,3.8,41.1,9.8
+ s7.3,14.2,7.3,23.2c0,13.2-2.6,21.6-10.7,26.6s-21.4,6.7-42.9,6.7h-17.8h-17.8c-17.3,0-29.2-2-36.7-7.1s-10.7-13.3-10.7-25.6h19.4
+ H596.2z"/>
+ <path class="st6" d="M713.8,476.3l50.7-30.8l50.7-30.8h25.1h25.1v40.9v40.9h10.5h10.5v15.9v15.9h-10.5h-10.5v14.2v14.2h-20.6
+ h-20.6v-14.2v-14.2H769h-55.2v-26V476.3z M747.9,496.1v0.2v0.2H786h38.1v-23.8v-23.8L786,472.4L747.9,496.1z"/>
+ </g>
+</g>
+<g id="DTV" class="st4">
+ <g class="st5">
+ <path class="st6" d="M135.3,368.4h87.1h87.1c28.9,0,48.4,4.7,60.6,15.3s17.4,26.9,17.4,50.2v28.6v28.6c0,23.3-5.1,39.6-17.4,50.2
+ s-31.8,15.3-60.6,15.3h-87.1h-87.1v-94.1V368.4z M193,508.3h51.2h51.2c12.3,0,20.9-1.8,26.4-6.9s7.9-13.6,7.9-26.9v-12.7V449
+ c0-13.4-2.4-21.8-7.9-26.9s-14.1-6.9-26.4-6.9h-51.2H193v46.5V508.3z"/>
+ <path class="st6" d="M408.5,368.4h110h110v23.4v23.4h-40.6h-40.6v70.7v70.7h-28.9h-28.9v-70.7v-70.7h-40.6h-40.6v-23.4V368.4z"/>
+ <path class="st6" d="M635.5,368.4h31.6h31.6l36.8,69.9l36.8,69.9l36.8-69.9l36.8-69.9h31.6H909l-50.6,94.1l-50.6,94.1h-35.6h-35.6
+ l-50.6-94.1L635.5,368.4z"/>
+ </g>
+</g>
+<g id="C64" class="st4">
+ <g class="st5">
+ <path class="st6" d="M132.4,434.4c0-27.6,7.7-44.6,22-54.7s35-13.4,61-13.4h33.9h33.9c41.1,0,64.3,4.4,77.2,15.5
+ s15.4,28.8,15.1,55.5h-28.9h-28.9v-2.6v-2.6c0-6.8-2.5-11.1-7.1-13.8s-11.4-3.6-20-3.6h-31.5h-31.5c-15.2,0-24.2,3.6-29.5,10.1
+ s-6.7,15.9-6.7,27.6v10.1v10.1c0,13.6,1.4,23.1,6.3,29.1s13.1,8.6,26.7,8.6h30.8h30.8c13,0,21.4-0.6,26.6-4.2s7.1-10.1,7.1-21.8
+ H349h28.9v8.8v8.8c0,15.9-2.9,30-13,40.2s-27.5,16.4-56.5,16.4h-46.5h-46.5c-26,0-46.7-3.2-61-13.4s-22-27.2-22-54.7v-28.1V434.4z
+ "/>
+ <path class="st6" d="M413.2,440.1c0-28.6,5.2-47.1,18.1-58.4s33.5-15.5,64.3-15.5h30h30c27.4,0,44.8,4.7,55.3,12.5
+ s14.1,18.5,14.1,30.4v7.4v7.4h-25h-25c0-6.4-2.1-10.7-6.7-13.4s-11.8-3.8-21.9-3.8h-25.3h-25.3c-9.9,0-16.9,1.9-21.4,5.8
+ s-6.6,9.5-6.6,16.9v11.2v11.2c4.7-4.7,9.7-8.3,16.5-10.7s15.1-3.6,26.4-3.6h26.9h26.9c27.8,0,44.2,4.6,53.6,13.5s11.9,22,11.9,39
+ v8.2v8.2c0,23.1-5.7,36.2-16.9,43.5s-28.1,8.8-50.4,8.8h-41.1h-41.1c-22.5,0-39.3-4.3-50.5-14.7s-16.8-26.9-16.8-51.3v-26.3V440.1
+ z M548.7,518.1c11,0,18.1-1.2,22.5-4.5s5.9-8.5,5.9-16.6c0-7.9-1.5-13.1-5.9-16.2s-11.8-4.3-23.5-4.3h-25.2h-25.2
+ c-11.7,0-19,1.2-23.5,4.3s-5.9,8.3-5.9,16.2c0,8.1,1.6,13.3,5.9,16.6s11.4,4.5,22.5,4.5h26.3H548.7z"/>
+ <path class="st6" d="M664.1,450l67.2-40.8l67.2-40.8h33.3h33.3v54.2v54.2H879h13.9v21.1v21.1H879h-13.9v18.8v18.8h-27.3h-27.3
+ v-18.8v-18.8h-73.2h-73.2v-34.4V450z M709.3,476.3v0.3v0.3h50.6h50.6v-31.6v-31.6L759.9,445L709.3,476.3z"/>
+ </g>
+</g>
+<g id="SID" class="st4">
+ <g class="st5">
+ <path class="st6" d="M197.3,495h28.9H255c0.1,10,2.2,15.4,6.3,18.3s10.3,3.3,18.6,3.3h35.4h35.4c6.1,0,12.3-0.3,16.9-2.5
+ s7.8-6.1,7.8-13.4c0-8.2-1.7-12.5-12.7-14.9s-31.3-2.6-68.4-2.6c-43.4,0-67.6-2.6-80.9-11s-15.8-22.6-15.8-45.7
+ c0-17,0.8-32.1,10.7-42.9s28.9-17.4,65.3-17.4h40.3H354c33.3,0,51.5,5.7,61.4,15.4s11.4,23.7,11.4,40.2v3v3H398h-28.9
+ c0-6.9-0.4-11.8-4.1-14.9s-10.7-4.6-24-4.6h-32h-32c-6.5,0-12,1.1-15.8,3.5s-6,6-6,11.1c0,8.2,1.8,12.4,11.2,14.6
+ s26.7,2.2,57.7,2.1c44.8-0.1,72.5,1.2,88.9,9.4s21.6,23.3,21.6,50.7c0,25.3-4.3,40.1-18.2,48.5s-37.3,10.5-75.7,10.5h-35h-35
+ c-26.3,0-44.7-2.5-56.5-10s-17.1-20.2-17.1-40.7v-6.5V495z"/>
+ <path class="st6" d="M473.4,368.4h28.9h28.9v94.1v94.1h-28.9h-28.9v-94.1V368.4z"/>
+ <path class="st6" d="M575.3,368.4h87.1h87.1c28.9,0,48.4,4.7,60.6,15.3s17.4,26.9,17.4,50.2v28.6v28.6c0,23.3-5.1,39.6-17.4,50.2
+ s-31.8,15.3-60.6,15.3h-87.1h-87.1v-94.1V368.4z M633,508.3h51.2h51.2c12.3,0,20.9-1.8,26.4-6.9s7.9-13.6,7.9-26.9v-12.7V449
+ c0-13.4-2.4-21.8-7.9-26.9s-14.1-6.9-26.4-6.9h-51.2H633v46.5V508.3z"/>
+ </g>
+</g>
+<g id="PET">
+ <g>
+ <path class="st6" d="M165.4,368.4h78.6h78.6c27.4,0,44.5,6.9,54.6,18.4s13.5,27.6,13.5,46.1v8.1v8.1c0,14-3.1,29.1-11.2,40.7
+ s-21.4,19.6-41.8,19.6h-57.3h-57.3V533v23.7h-28.9h-28.9v-94.1V368.4z M223.1,462.5H268h44.8c6.8,0,11.4-2.2,14.4-5.8
+ s4.3-8.6,4.3-14.2v-3.6v-3.6c0-6.4-1.6-11.4-5.3-14.8s-9.7-5.2-18.4-5.2h-42.4h-42.4v23.7V462.5z"/>
+ <path class="st6" d="M422,368.4h103h103v21.8v21.8h-74.1h-74.1v15.1v15.1H550h70.2v19.5v19.5H550h-70.2v15.1v15.1h75.8h75.8V534
+ v22.6H526.7H422v-94.1V368.4z"/>
+ <path class="st6" d="M652.4,368.4h110h110v23.4v23.4h-40.6h-40.6v70.7v70.7h-28.9h-28.9v-70.7v-70.7H693h-40.6v-23.4V368.4z"/>
+ </g>
+</g>
+<g id="CBM2" class="st4">
+ <g class="st5">
+ <path class="st6" d="M133.3,474.4c0-18.6,5.2-30,14.8-36.8s23.5-9,41-9H212h22.8c27.7,0,43.3,3,51.9,10.4s10.4,19.4,10.2,37.3
+ h-19.4h-19.4v-1.8v-1.8c0-4.5-1.7-7.5-4.8-9.3s-7.7-2.4-13.4-2.4h-21.2h-21.2c-10.2,0-16.3,2.4-19.8,6.8s-4.5,10.7-4.5,18.6v6.8
+ v6.8c0,9.2,1,15.5,4.2,19.6s8.8,5.8,18,5.8h20.7h20.7c8.8,0,14.4-0.4,17.9-2.8s4.8-6.8,4.8-14.7h19.4h19.4v6v6
+ c0,10.7-1.9,20.2-8.7,27.1s-18.5,11.1-38,11.1h-31.3h-31.3c-17.5,0-31.5-2.2-41-9s-14.8-18.3-14.8-36.8v-18.9V474.4z"/>
+ <path class="st6" d="M322,429.9h55.9h55.9c15.5,0,27,2.1,34.6,7.3s11.4,13.5,11.4,25.9c0,10.9-2,17.3-5.3,21.5s-8,6-13.4,7.6v0.3
+ v0.3c8.5,1,14.3,3.8,18,8.8s5.3,12,5.3,21.5c0,13.9-4.1,22.3-11,27.2s-16.6,6.4-27.7,6.4h-61.9H322v-63.4V429.9z M360.8,480.1
+ h34.4h34.4c3.6,0,6.4-0.7,8.4-2.2s3-4,3-7.6c0-3.7-1.1-6.2-3-7.7s-4.8-2.2-8.4-2.2h-34.4h-34.4v9.9V480.1z M360.8,526.2h34.8h34.8
+ c4.2,0,7.7-0.5,10.2-1.9s3.9-3.7,3.9-7.4c0-4.3-1.4-6.9-3.9-8.5s-6-2-10.2-2h-34.8h-34.8v9.9V526.2z"/>
+ <path class="st6" d="M507.8,429.9h29.8h29.8l22,40.8l22,40.8l22-40.8l22-40.8h29.8H715v63.4v63.4h-18.9h-18.9v-45.5v-45.5H677
+ h-0.2l-25.5,45.5l-25.5,45.5h-14.5h-14.5l-25.5-45.5L546,465.6h-0.2h-0.2v45.5v45.5h-18.9h-18.9v-63.4V429.9z"/>
+ <path class="st6" d="M740.4,513.6c0-7.8,2.5-14.3,8.2-19s14.5-7.8,27-8.6l22.2-1.4l22.2-1.4c14.2-0.9,21.7-1.4,25.8-3.3
+ s4.5-5.1,4.5-11.4c0-5.2-0.3-8.3-3.6-10.2s-9.8-2.4-22.3-2.4h-12.9h-12.9c-8.2,0-13.6,0.6-16.9,2.9s-4.6,6.1-4.6,12.7v2.7v2.7
+ h-18.4h-18.4v-7.4v-7.4c0-12.5,3.7-20.9,11.7-26.1s20.5-7.3,38-7.3h25.6h25.6c18.2,0,29.7,2.7,36.6,8.7s9.3,15.3,9.3,28.5
+ c0,18.6-1.7,29.5-9.1,36.1s-20.4,8.7-43.1,10l-20,1l-20,1c-8.1,0.4-12.8,1.4-15.5,3.8s-3.3,6-3.3,11.6h56.4h56.4V543v13.7h-74.2
+ h-74.2v-21.5V513.6z"/>
+ </g>
+</g>
+<g id="SCPU" class="st4">
+ <g class="st5">
+ <path class="st6" d="M159.9,515.2h19.4h19.4c0.1,6.7,1.5,10.4,4.3,12.3s6.9,2.2,12.5,2.2h23.8h23.8c4.1,0,8.3-0.2,11.4-1.7
+ s5.2-4.1,5.2-9c0-5.5-1.1-8.4-8.5-10s-21-1.7-46.1-1.7c-29.2,0-45.5-1.8-54.5-7.4s-10.6-15.2-10.6-30.8c0-11.5,0.5-21.6,7.2-28.9
+ s19.4-11.7,43.9-11.7h27.1h27.1c22.4,0,34.7,3.8,41.3,10.4s7.7,15.9,7.7,27.1v2v2H295h-19.4c0-4.6-0.3-7.9-2.8-10
+ s-7.2-3.1-16.1-3.1h-21.5h-21.5c-4.4,0-8.1,0.7-10.6,2.3s-4.1,4-4.1,7.5c0,5.5,1.2,8.4,7.6,9.8s18,1.5,38.8,1.4
+ c30.2-0.1,48.8,0.8,59.8,6.3s14.5,15.7,14.5,34.1c0,17.1-2.9,27-12.2,32.7s-25.1,7.1-50.9,7.1H233h-23.5c-17.7,0-30.1-1.7-38-6.8
+ s-11.5-13.6-11.5-27.4v-4.4V515.2z"/>
+ <path class="st6" d="M340.8,474.4c0-18.6,5.2-30,14.8-36.8s23.5-9,41-9h22.8h22.8c27.7,0,43.3,3,51.9,10.4s10.4,19.4,10.2,37.3
+ h-19.4h-19.4v-1.8v-1.8c0-4.5-1.7-7.5-4.8-9.3s-7.7-2.4-13.4-2.4h-21.2h-21.2c-10.2,0-16.3,2.4-19.8,6.8s-4.5,10.7-4.5,18.6v6.8
+ v6.8c0,9.2,1,15.5,4.2,19.6s8.8,5.8,18,5.8h20.7h20.7c8.8,0,14.4-0.4,17.9-2.8s4.8-6.8,4.8-14.7h19.4h19.4v6v6
+ c0,10.7-1.9,20.2-8.7,27.1s-18.5,11.1-38,11.1H428h-31.3c-17.5,0-31.5-2.2-41-9s-14.8-18.3-14.8-36.8v-18.9V474.4z"/>
+ <path class="st6" d="M529.5,429.9h52.9h52.9c18.5,0,29.9,4.6,36.8,12.4s9.1,18.6,9.1,31v5.4v5.4c0,9.5-2.1,19.6-7.5,27.4
+ s-14.4,13.2-28.2,13.2h-38.6h-38.6v15.9v15.9h-19.4h-19.4v-63.4V429.9z M568.4,493.3h30.2h30.2c4.5,0,7.7-1.5,9.7-3.9
+ s2.9-5.8,2.9-9.6v-2.5v-2.5c0-4.3-1.1-7.7-3.6-10s-6.5-3.5-12.4-3.5h-28.5h-28.5v15.9V493.3z"/>
+ <path class="st6" d="M702.2,429.9h19.4h19.4v36.6v36.6c0,8,1.4,13.6,4.9,17.2s8.9,5.2,16.8,5.2H782h19.2c8,0,13.4-1.6,16.8-5.2
+ s4.9-9.2,4.9-17.2v-36.6v-36.6h19.4h19.4v40.8v40.8c0,15.8-4.1,27.4-12.6,35.1S827.7,558,809.9,558H782h-27.8
+ c-17.9,0-30.8-3.8-39.4-11.5s-12.6-19.3-12.6-35.1v-40.8V429.9z"/>
+ </g>
+</g>
+</svg>
Deleted: trunk/vice/data/common/vice-xpet_256.svg
===================================================================
--- trunk/vice/data/common/vice-xpet_256.svg 2025-02-14 19:14:50 UTC (rev 45495)
+++ trunk/vice/data/common/vice-xpet_256.svg 2025-02-16 10:54:57 UTC (rev 45496)
@@ -1,171 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 24.2.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- viewBox="0 0 1024 1024" style="enable-background:new 0 0 1024 1024;" xml:space="preserve">
-<style type="text/css">
- .st0{fill-rule:evenodd;clip-rule:evenodd;fill:#3D3D3D;}
- .st1{fill-rule:evenodd;clip-rule:evenodd;fill:#595959;}
- .st2{fill:#2B2B2B;}
- .st3{fill:#7C7C7C;}
- .st4{display:none;}
- .st5{display:inline;}
- .st6{fill:#FFFFFF;}
-</style>
-<g id="Layer_11_copy_3">
- <path class="st0" d="M267.1,1010h-63.9h-63.9c-34.6,0-65.9-14-88.6-36.7C28,950.6,14,919.3,14,884.7V512V139.3
- c0-34.6,14-65.9,36.7-88.6s54-36.7,88.6-36.7H512h372.7c34.6,0,65.9,14,88.6,36.7c22.7,22.7,36.7,54,36.7,88.6V512v372.7
- c0,34.6-14,65.9-36.7,88.6c-22.7,22.7-54,36.7-88.6,36.7h-64h-64H511.9H267.1z"/>
- <path class="st1" d="M267.1,1010H139.3C70.1,1010,14,953.9,14,884.7V809h996v75.7c0,69.2-56.1,125.3-125.3,125.3H756.7H267.1z"/>
- <g>
- <g>
- <rect x="14" y="610" class="st2" width="996" height="20"/>
- <rect x="14" y="630" class="st3" width="996" height="20"/>
- </g>
- <g>
- <rect x="14" y="650" class="st2" width="996" height="20"/>
- <rect x="14" y="670" class="st3" width="996" height="20"/>
- </g>
- <g>
- <rect x="14" y="690" class="st2" width="996" height="20"/>
- <rect x="14" y="710" class="st3" width="996" height="20"/>
- </g>
- <g>
- <rect x="14" y="730" class="st2" width="996" height="20"/>
- <rect x="14" y="750" class="st3" width="996" height="20"/>
- </g>
- <g>
- <rect x="14" y="770" class="st2" width="996" height="20"/>
- <rect x="14" y="790" class="st3" width="996" height="20"/>
- </g>
- </g>
-</g>
-<g id="VIC20" class="st4">
- <g class="st5">
- <path class="st6" d="M130.7,433.5h20.7H172l24.1,45.7l24.1,45.7l24.1-45.7l24.1-45.7h20.7h20.7l-33.1,61.5l-33.1,61.5h-23.3h-23.3
- l-33.1-61.5L130.7,433.5z"/>
- <path class="st6" d="M325.2,433.5H344h18.9v61.5v61.5H344h-18.9v-61.5V433.5z"/>
- <path class="st6" d="M387.7,476.7c0-18,5.1-29.2,14.4-35.8s22.9-8.8,39.9-8.8h22.2h22.2c26.9,0,42,2.9,50.4,10.1
- s10.1,18.8,9.9,36.3h-18.9h-18.9v-1.7v-1.7c0-4.4-1.6-7.3-4.6-9s-7.4-2.4-13-2.4h-20.6h-20.6c-9.9,0-15.9,2.3-19.3,6.6
- s-4.4,10.4-4.4,18.1v6.6v6.6c0,8.9,0.9,15.1,4.1,19s8.6,5.6,17.5,5.6h20.1h20.1c8.5,0,14-0.4,17.4-2.8s4.7-6.6,4.7-14.2h18.9h18.9
- v5.8v5.8c0,10.4-1.9,19.6-8.5,26.3s-18,10.8-36.9,10.8h-30.4H442c-17,0-30.6-2.1-39.9-8.8s-14.4-17.8-14.4-35.8v-18.4V476.7z"/>
- <path class="st6" d="M570.1,514.8c0-7.6,2.5-13.9,8-18.5s14-7.5,26.2-8.4l21.6-1.4l21.6-1.4c13.8-0.9,21.1-1.4,25-3.3
- s4.4-5,4.4-11c0-5-0.3-8.1-3.5-9.9s-9.6-2.4-21.6-2.4h-12.5h-12.5c-8,0-13.2,0.6-16.4,2.8s-4.5,6-4.5,12.3v2.6v2.6H588h-17.8v-7.2
- v-7.2c0-12.2,3.6-20.3,11.4-25.4s19.9-7.1,36.9-7.1h24.8h24.8c17.7,0,28.8,2.6,35.5,8.5s9,14.9,9,27.7c0,18.1-1.7,28.7-8.8,35
- s-19.8,8.5-41.8,9.7l-19.5,1l-19.5,1c-7.9,0.4-12.5,1.4-15,3.7s-3.2,5.8-3.2,11.3h54.7h54.7v13.3v13.3h-72.1h-72.1v-20.9V514.8z"
- />
- <path class="st6" d="M734.2,480.5c0-18.7,3.4-30.8,11.8-38.2s21.9-10.1,42.1-10.1h22.1h22.1c20.1,0,33.6,2.7,42.1,10.1
- s11.8,19.5,11.8,38.2v17.2v17.2c0,16-3.7,26.8-11,33.6s-18.3,9.6-33,9.6h-32h-32c-14.7,0-25.7-2.8-33-9.6s-11-17.6-11-33.6v-17.2
- V480.5z M770.9,508.3c0,6.4,1,11.1,4.2,14.3s8.7,4.7,17.5,4.7h17.5h17.5c8.8,0,14.3-1.6,17.5-4.7s4.2-7.9,4.2-14.3v-13.3v-13.3
- c0-6.4-1-11.1-4.2-14.3s-8.7-4.7-17.5-4.7h-17.5h-17.5c-8.8,0-14.3,1.6-17.5,4.7s-4.2,7.9-4.2,14.3v13.3V508.3z"/>
- </g>
-</g>
-<g id="Plus4" class="st4">
- <g class="st5">
- <path class="st6" d="M141.9,414.7h59.3h59.3c20.7,0,33.5,5.2,41.2,13.9s10.2,20.8,10.2,34.7v6.1v6.1c0,10.6-2.3,22-8.5,30.7
- S287.2,521,271.8,521h-43.2h-43.2v17.8v17.8h-21.8h-21.8v-71V414.7z M185.4,485.7h33.8H253c5.1,0,8.6-1.7,10.9-4.4
- s3.2-6.5,3.2-10.7v-2.7v-2.7c0-4.8-1.2-8.6-4-11.1s-7.3-3.9-13.8-3.9h-31.9h-31.9v17.8V485.7z"/>
- <path class="st6" d="M335.7,414.7h18.8h18.8v71v71h-18.8h-18.8v-71V414.7z"/>
- <path class="st6" d="M535.2,556.6h-18.8h-18.8v-8v-8h-0.2h-0.2c-3.3,7-8.3,11.4-14.9,14s-15,3.6-25.1,3.6
- c-11.7,0-25.6-0.2-36.7-5.9s-19.2-16.7-19.2-38.2v-28.7v-28.7h18.8H439v28.7v28.7c0,4.9,2,8.6,6,11s10.1,3.7,18.3,3.7h4.3h4.3
- c8,0,14.5-1.9,18.9-5.5s6.8-9.1,6.8-16.2v-25.2v-25.2h18.8h18.8v50V556.6z"/>
- <path class="st6" d="M596.2,525.5c0,2.7,0.5,5,3.7,6.7s9,2.5,19.7,2.5h6.7h6.7c8.9,0,14.5-0.3,17.9-1.4s4.5-3,4.5-6
- c0-2.9-0.7-5-3.1-6.3s-6.5-1.9-13.1-1.9h-17.6h-17.6c-17.5-0.1-28.9-2.1-35.9-7.4s-9.6-14.1-9.6-27.9c0-12.4,5-19.6,13.2-23.6
- s19.7-5,32.6-5h13.1h13.1c24.6,0,39.1,1.7,47.4,6.4s10.6,12.2,10.8,24h-18.8h-18.8c-1-2.9-2.4-4.7-6.3-5.6s-10.5-1.2-21.7-1.2
- c-10.9,0-17.3,0.1-21.1,1.2s-4.8,2.9-4.8,6.3c0,2.2,0.7,3.6,3.9,4.6s8.8,1.3,18.6,1.3h13h13c22.5,0,34.6,3.8,41.1,9.8
- s7.3,14.2,7.3,23.2c0,13.2-2.6,21.6-10.7,26.6s-21.4,6.7-42.9,6.7h-17.8h-17.8c-17.3,0-29.2-2-36.7-7.1s-10.7-13.3-10.7-25.6h19.4
- H596.2z"/>
- <path class="st6" d="M713.8,476.3l50.7-30.8l50.7-30.8h25.1h25.1v40.9v40.9h10.5h10.5v15.9v15.9h-10.5h-10.5v14.2v14.2h-20.6
- h-20.6v-14.2v-14.2H769h-55.2v-26V476.3z M747.9,496.1v0.2v0.2H786h38.1v-23.8v-23.8L786,472.4L747.9,496.1z"/>
- </g>
-</g>
-<g id="DTV" class="st4">
- <g class="st5">
- <path class="st6" d="M135.3,368.4h87.1h87.1c28.9,0,48.4,4.7,60.6,15.3s17.4,26.9,17.4,50.2v28.6v28.6c0,23.3-5.1,39.6-17.4,50.2
- s-31.8,15.3-60.6,15.3h-87.1h-87.1v-94.1V368.4z M193,508.3h51.2h51.2c12.3,0,20.9-1.8,26.4-6.9s7.9-13.6,7.9-26.9v-12.7V449
- c0-13.4-2.4-21.8-7.9-26.9s-14.1-6.9-26.4-6.9h-51.2H193v46.5V508.3z"/>
- <path class="st6" d="M408.5,368.4h110h110v23.4v23.4h-40.6h-40.6v70.7v70.7h-28.9h-28.9v-70.7v-70.7h-40.6h-40.6v-23.4V368.4z"/>
- <path class="st6" d="M635.5,368.4h31.6h31.6l36.8,69.9l36.8,69.9l36.8-69.9l36.8-69.9h31.6H909l-50.6,94.1l-50.6,94.1h-35.6h-35.6
- l-50.6-94.1L635.5,368.4z"/>
- </g>
-</g>
-<g id="C64" class="st4">
- <g class="st5">
- <path class="st6" d="M132.4,434.4c0-27.6,7.7-44.6,22-54.7s35-13.4,61-13.4h33.9h33.9c41.1,0,64.3,4.4,77.2,15.5
- s15.4,28.8,15.1,55.5h-28.9h-28.9v-2.6v-2.6c0-6.8-2.5-11.1-7.1-13.8s-11.4-3.6-20-3.6h-31.5h-31.5c-15.2,0-24.2,3.6-29.5,10.1
- s-6.7,15.9-6.7,27.6v10.1v10.1c0,13.6,1.4,23.1,6.3,29.1s13.1,8.6,26.7,8.6h30.8h30.8c13,0,21.4-0.6,26.6-4.2s7.1-10.1,7.1-21.8
- H349h28.9v8.8v8.8c0,15.9-2.9,30-13,40.2s-27.5,16.4-56.5,16.4h-46.5h-46.5c-26,0-46.7-3.2-61-13.4s-22-27.2-22-54.7v-28.1V434.4z
- "/>
- <path class="st6" d="M413.2,440.1c0-28.6,5.2-47.1,18.1-58.4s33.5-15.5,64.3-15.5h30h30c27.4,0,44.8,4.7,55.3,12.5
- s14.1,18.5,14.1,30.4v7.4v7.4h-25h-25c0-6.4-2.1-10.7-6.7-13.4s-11.8-3.8-21.9-3.8h-25.3h-25.3c-9.9,0-16.9,1.9-21.4,5.8
- s-6.6,9.5-6.6,16.9v11.2v11.2c4.7-4.7,9.7-8.3,16.5-10.7s15.1-3.6,26.4-3.6h26.9h26.9c27.8,0,44.2,4.6,53.6,13.5s11.9,22,11.9,39
- v8.2v8.2c0,23.1-5.7,36.2-16.9,43.5s-28.1,8.8-50.4,8.8h-41.1h-41.1c-22.5,0-39.3-4.3-50.5-14.7s-16.8-26.9-16.8-51.3v-26.3V440.1
- z M548.7,518.1c11,0,18.1-1.2,22.5-4.5s5.9-8.5,5.9-16.6c0-7.9-1.5-13.1-5.9-16.2s-11.8-4.3-23.5-4.3h-25.2h-25.2
- c-11.7,0-19,1.2-23.5,4.3s-5.9,8.3-5.9,16.2c0,8.1,1.6,13.3,5.9,16.6s11.4,4.5,22.5,4.5h26.3H548.7z"/>
- <path class="st6" d="M664.1,450l67.2-40.8l67.2-40.8h33.3h33.3v54.2v54.2H879h13.9v21.1v21.1H879h-13.9v18.8v18.8h-27.3h-27.3
- v-18.8v-18.8h-73.2h-73.2v-34.4V450z M709.3,476.3v0.3v0.3h50.6h50.6v-31.6v-31.6L759.9,445L709.3,476.3z"/>
- </g>
-</g>
-<g id="SID" class="st4">
- <g class="st5">
- <path class="st6" d="M197.3,495h28.9H255c0.1,10,2.2,15.4,6.3,18.3s10.3,3.3,18.6,3.3h35.4h35.4c6.1,0,12.3-0.3,16.9-2.5
- s7.8-6.1,7.8-13.4c0-8.2-1.7-12.5-12.7-14.9s-31.3-2.6-68.4-2.6c-43.4,0-67.6-2.6-80.9-11s-15.8-22.6-15.8-45.7
- c0-17,0.8-32.1,10.7-42.9s28.9-17.4,65.3-17.4h40.3H354c33.3,0,51.5,5.7,61.4,15.4s11.4,23.7,11.4,40.2v3v3H398h-28.9
- c0-6.9-0.4-11.8-4.1-14.9s-10.7-4.6-24-4.6h-32h-32c-6.5,0-12,1.1-15.8,3.5s-6,6-6,11.1c0,8.2,1.8,12.4,11.2,14.6
- s26.7,2.2,57.7,2.1c44.8-0.1,72.5,1.2,88.9,9.4s21.6,23.3,21.6,50.7c0,25.3-4.3,40.1-18.2,48.5s-37.3,10.5-75.7,10.5h-35h-35
- c-26.3,0-44.7-2.5-56.5-10s-17.1-20.2-17.1-40.7v-6.5V495z"/>
- <path class="st6" d="M473.4,368.4h28.9h28.9v94.1v94.1h-28.9h-28.9v-94.1V368.4z"/>
- <path class="st6" d="M575.3,368.4h87.1h87.1c28.9,0,48.4,4.7,60.6,15.3s17.4,26.9,17.4,50.2v28.6v28.6c0,23.3-5.1,39.6-17.4,50.2
- s-31.8,15.3-60.6,15.3h-87.1h-87.1v-94.1V368.4z M633,508.3h51.2h51.2c12.3,0,20.9-1.8,26.4-6.9s7.9-13.6,7.9-26.9v-12.7V449
- c0-13.4-2.4-21.8-7.9-26.9s-14.1-6.9-26.4-6.9h-51.2H633v46.5V508.3z"/>
- </g>
-</g>
-<g id="PET">
- <g>
- <path class="st6" d="M165.4,368.4h78.6h78.6c27.4,0,44.5,6.9,54.6,18.4s13.5,27.6,13.5,46.1v8.1v8.1c0,14-3.1,29.1-11.2,40.7
- s-21.4,19.6-41.8,19.6h-57.3h-57.3V533v23.7h-28.9h-28.9v-94.1V368.4z M223.1,462.5H268h44.8c6.8,0,11.4-2.2,14.4-5.8
- s4.3-8.6,4.3-14.2v-3.6v-3.6c0-6.4-1.6-11.4-5.3-14.8s-9.7-5.2-18.4-5.2h-42.4h-42.4v23.7V462.5z"/>
- <path class="st6" d="M422,368.4h103h103v21.8v21.8h-74.1h-74.1v15.1v15.1H550h70.2v19.5v19.5H550h-70.2v15.1v15.1h75.8h75.8V534
- v22.6H526.7H422v-94.1V368.4z"/>
- <path class="st6" d="M652.4,368.4h110h110v23.4v23.4h-40.6h-40.6v70.7v70.7h-28.9h-28.9v-70.7v-70.7H693h-40.6v-23.4V368.4z"/>
- </g>
-</g>
-<g id="CBM2" class="st4">
- <g class="st5">
- <path class="st6" d="M133.3,474.4c0-18.6,5.2-30,14.8-36.8s23.5-9,41-9H212h22.8c27.7,0,43.3,3,51.9,10.4s10.4,19.4,10.2,37.3
- h-19.4h-19.4v-1.8v-1.8c0-4.5-1.7-7.5-4.8-9.3s-7.7-2.4-13.4-2.4h-21.2h-21.2c-10.2,0-16.3,2.4-19.8,6.8s-4.5,10.7-4.5,18.6v6.8
- v6.8c0,9.2,1,15.5,4.2,19.6s8.8,5.8,18,5.8h20.7h20.7c8.8,0,14.4-0.4,17.9-2.8s4.8-6.8,4.8-14.7h19.4h19.4v6v6
- c0,10.7-1.9,20.2-8.7,27.1s-18.5,11.1-38,11.1h-31.3h-31.3c-17.5,0-31.5-2.2-41-9s-14.8-18.3-14.8-36.8v-18.9V474.4z"/>
- <path class="st6" d="M322,429.9h55.9h55.9c15.5,0,27,2.1,34.6,7.3s11.4,13.5,11.4,25.9c0,10.9-2,17.3-5.3,21.5s-8,6-13.4,7.6v0.3
- v0.3c8.5,1,14.3,3.8,18,8.8s5.3,12,5.3,21.5c0,13.9-4.1,22.3-11,27.2s-16.6,6.4-27.7,6.4h-61.9H322v-63.4V429.9z M360.8,480.1
- h34.4h34.4c3.6,0,6.4-0.7,8.4-2.2s3-4,3-7.6c0-3.7-1.1-6.2-3-7.7s-4.8-2.2-8.4-2.2h-34.4h-34.4v9.9V480.1z M360.8,526.2h34.8h34.8
- c4.2,0,7.7-0.5,10.2-1.9s3.9-3.7,3.9-7.4c0-4.3-1.4-6.9-3.9-8.5s-6-2-10.2-2h-34.8h-34.8v9.9V526.2z"/>
- <path class="st6" d="M507.8,429.9h29.8h29.8l22,40.8l22,40.8l22-40.8l22-40.8h29.8H715v63.4v63.4h-18.9h-18.9v-45.5v-45.5H677
- h-0.2l-25.5,45.5l-25.5,45.5h-14.5h-14.5l-25.5-45.5L546,465.6h-0.2h-0.2v45.5v45.5h-18.9h-18.9v-63.4V429.9z"/>
- <path class="st6" d="M740.4,513.6c0-7.8,2.5-14.3,8.2-19s14.5-7.8,27-8.6l22.2-1.4l22.2-1.4c14.2-0.9,21.7-1.4,25.8-3.3
- s4.5-5.1,4.5-11.4c0-5.2-0.3-8.3-3.6-10.2s-9.8-2.4-22.3-2.4h-12.9h-12.9c-8.2,0-13.6,0.6-16.9,2.9s-4.6,6.1-4.6,12.7v2.7v2.7
- h-18.4h-18.4v-7.4v-7.4c0-12.5,3.7-20.9,11.7-26.1s20.5-7.3,38-7.3h25.6h25.6c18.2,0,29.7,2.7,36.6,8.7s9.3,15.3,9.3,28.5
- c0,18.6-1.7,29.5-9.1,36.1s-20.4,8.7-43.1,10l-20,1l-20,1c-8.1,0.4-12.8,1.4-15.5,3.8s-3.3,6-3.3,11.6h56.4h56.4V543v13.7h-74.2
- h-74.2v-21.5V513.6z"/>
- </g>
-</g>
-<g id="SCPU" class="st4">
- <g class="st5">
- <path class="st6" d="M159.9,515.2h19.4h19.4c0.1,6.7,1.5,10.4,4.3,12.3s6.9,2.2,12.5,2.2h23.8h23.8c4.1,0,8.3-0.2,11.4-1.7
- s5.2-4.1,5.2-9c0-5.5-1.1-8.4-8.5-10s-21-1.7-46.1-1.7c-29.2,0-45.5-1.8-54.5-7.4s-10.6-15.2-10.6-30.8c0-11.5,0.5-21.6,7.2-28.9
- s19.4-11.7,43.9-11.7h27.1h27.1c22.4,0,34.7,3.8,41.3,10.4s7.7,15.9,7.7,27.1v2v2H295h-19.4c0-4.6-0.3-7.9-2.8-10
- s-7.2-3.1-16.1-3.1h-21.5h-21.5c-4.4,0-8.1,0.7-10.6,2.3s-4.1,4-4.1,7.5c0,5.5,1.2,8.4,7.6,9.8s18,1.5,38.8,1.4
- c30.2-0.1,48.8,0.8,59.8,6.3s14.5,15.7,14.5,34.1c0,17.1-2.9,27-12.2,32.7s-25.1,7.1-50.9,7.1H233h-23.5c-17.7,0-30.1-1.7-38-6.8
- s-11.5-13.6-11.5-27.4v-4.4V515.2z"/>
- <path class="st6" d="M340.8,474.4c0-18.6,5.2-30,14.8-36.8s23.5-9,41-9h22.8h22.8c27.7,0,43.3,3,51.9,10.4s10.4,19.4,10.2,37.3
- h-19.4h-19.4v-1.8v-1.8c0-4.5-1.7-7.5-4.8-9.3s-7.7-2.4-13.4-2.4h-21.2h-21.2c-10.2,0-16.3,2.4-19.8,6.8s-4.5,10.7-4.5,18.6v6.8
- v6.8c0,9.2,1,15.5,4.2,19.6s8.8,5.8,18,5.8h20.7h20.7c8.8,0,14.4-0.4,17.9-2.8s4.8-6.8,4.8-14.7h19.4h19.4v6v6
- c0,10.7-1.9,20.2-8.7,27.1s-18.5,11.1-38,11.1H428h-31.3c-17.5,0-31.5-2.2-41-9s-14.8-18.3-14.8-36.8v-18.9V474.4z"/>
- <path class="st6" d="M529.5,429.9h52.9h52.9c18.5,0,29.9,4.6,36.8,12.4s9.1,18.6,9.1,31v5.4v5.4c0,9.5-2.1,19.6-7.5,27.4
- s-14.4,13.2-28.2,13.2h-38.6h-38.6v15.9v15.9h-19.4h-19.4v-63.4V429.9z M568.4,493.3h30.2h30.2c4.5,0,7.7-1.5,9.7-3.9
- s2.9-5.8,2.9-9.6v-2.5v-2.5c0-4.3-1.1-7.7-3.6-10s-6.5-3.5-12.4-3.5h-28.5h-28.5v15.9V493.3z"/>
- <path class="st6" d="M702.2,429.9h19.4h19.4v36.6v36.6c0,8,1.4,13.6,4.9,17.2s8.9,5.2,16.8,5.2H782h19.2c8,0,13.4-1.6,16.8-5.2
- s4.9-9.2,4.9-17.2v-36.6v-36.6h19.4h19.4v40.8v40.8c0,15.8-4.1,27.4-12.6,35.1S827.7,558,809.9,558H782h-27.8
- c-17.9,0-30.8-3.8-39.4-11.5s-12.6-19.3-12.6-35.1v-40.8V429.9z"/>
- </g>
-</g>
-</svg>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|