early-access version 2325
This commit is contained in:
28
externals/SDL/src/core/linux/SDL_evdev.c
vendored
28
externals/SDL/src/core/linux/SDL_evdev.c
vendored
@@ -57,6 +57,10 @@
|
||||
#define ABS_MT_TRACKING_ID 0x39
|
||||
#define ABS_MT_PRESSURE 0x3a
|
||||
#endif
|
||||
#ifndef REL_WHEEL_HI_RES
|
||||
#define REL_WHEEL_HI_RES 0x0b
|
||||
#define REL_HWHEEL_HI_RES 0x0c
|
||||
#endif
|
||||
|
||||
typedef struct SDL_evdevlist_item
|
||||
{
|
||||
@@ -92,6 +96,9 @@ typedef struct SDL_evdevlist_item
|
||||
|
||||
} * touchscreen_data;
|
||||
|
||||
SDL_bool high_res_wheel;
|
||||
SDL_bool high_res_hwheel;
|
||||
|
||||
struct SDL_evdevlist_item *next;
|
||||
} SDL_evdevlist_item;
|
||||
|
||||
@@ -378,10 +385,20 @@ SDL_EVDEV_Poll(void)
|
||||
SDL_SendMouseMotion(mouse->focus, mouse->mouseID, SDL_TRUE, 0, events[i].value);
|
||||
break;
|
||||
case REL_WHEEL:
|
||||
SDL_SendMouseWheel(mouse->focus, mouse->mouseID, 0, events[i].value, SDL_MOUSEWHEEL_NORMAL);
|
||||
if (!item->high_res_wheel)
|
||||
SDL_SendMouseWheel(mouse->focus, mouse->mouseID, 0, events[i].value, SDL_MOUSEWHEEL_NORMAL);
|
||||
break;
|
||||
case REL_WHEEL_HI_RES:
|
||||
SDL_assert(item->high_res_wheel);
|
||||
SDL_SendMouseWheel(mouse->focus, mouse->mouseID, 0, events[i].value / 120.0f, SDL_MOUSEWHEEL_NORMAL);
|
||||
break;
|
||||
case REL_HWHEEL:
|
||||
SDL_SendMouseWheel(mouse->focus, mouse->mouseID, events[i].value, 0, SDL_MOUSEWHEEL_NORMAL);
|
||||
if (!item->high_res_hwheel)
|
||||
SDL_SendMouseWheel(mouse->focus, mouse->mouseID, events[i].value, 0, SDL_MOUSEWHEEL_NORMAL);
|
||||
break;
|
||||
case REL_HWHEEL_HI_RES:
|
||||
SDL_assert(item->high_res_hwheel);
|
||||
SDL_SendMouseWheel(mouse->focus, mouse->mouseID, events[i].value / 120.0f, 0, SDL_MOUSEWHEEL_NORMAL);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -715,6 +732,7 @@ SDL_EVDEV_device_added(const char *dev_path, int udev_class)
|
||||
{
|
||||
int ret;
|
||||
SDL_evdevlist_item *item;
|
||||
unsigned long relbit[NBITS(REL_MAX)] = { 0 };
|
||||
|
||||
/* Check to make sure it's not already in list. */
|
||||
for (item = _this->first; item != NULL; item = item->next) {
|
||||
@@ -741,11 +759,17 @@ SDL_EVDEV_device_added(const char *dev_path, int udev_class)
|
||||
return SDL_OutOfMemory();
|
||||
}
|
||||
|
||||
if (ioctl(item->fd, EVIOCGBIT(EV_REL, sizeof(relbit)), relbit) >= 0) {
|
||||
item->high_res_wheel = test_bit(REL_WHEEL_HI_RES, relbit);
|
||||
item->high_res_hwheel = test_bit(REL_HWHEEL_HI_RES, relbit);
|
||||
}
|
||||
|
||||
if (udev_class & SDL_UDEV_DEVICE_TOUCHSCREEN) {
|
||||
item->is_touchscreen = 1;
|
||||
|
||||
if ((ret = SDL_EVDEV_init_touchscreen(item)) < 0) {
|
||||
close(item->fd);
|
||||
SDL_free(item->path);
|
||||
SDL_free(item);
|
||||
return ret;
|
||||
}
|
||||
|
2
externals/SDL/src/core/linux/SDL_fcitx.c
vendored
2
externals/SDL/src/core/linux/SDL_fcitx.c
vendored
@@ -205,7 +205,7 @@ Fcitx_SetCapabilities(void *data,
|
||||
const char *internal_editing)
|
||||
{
|
||||
FcitxClient *client = (FcitxClient *)data;
|
||||
Uint32 caps = 0;
|
||||
Uint64 caps = 0;
|
||||
if (!client->ic_path) {
|
||||
return;
|
||||
}
|
||||
|
2
externals/SDL/src/core/os2/SDL_os2.c
vendored
2
externals/SDL/src/core/os2/SDL_os2.c
vendored
@@ -23,7 +23,7 @@
|
||||
|
||||
#if defined(__OS2__)
|
||||
|
||||
#include "geniconv/geniconv.h"
|
||||
#include "SDL_os2.h"
|
||||
|
||||
/* SDL_OS2Quit() will be called from SDL_QuitSubSystem() */
|
||||
void SDL_OS2Quit(void)
|
||||
|
9
externals/SDL/src/core/os2/SDL_os2.h
vendored
9
externals/SDL/src/core/os2/SDL_os2.h
vendored
@@ -23,7 +23,6 @@
|
||||
|
||||
#include "SDL_log.h"
|
||||
#include "SDL_stdinc.h"
|
||||
#include "geniconv/geniconv.h"
|
||||
|
||||
#ifdef OS2DEBUG
|
||||
#if (OS2DEBUG-0 >= 2)
|
||||
@@ -39,10 +38,16 @@
|
||||
|
||||
#endif /* OS2DEBUG */
|
||||
|
||||
|
||||
#if defined(HAVE_ICONV) && defined(HAVE_ICONV_H)
|
||||
#define OS2_SysToUTF8(S) SDL_iconv_string("UTF-8", "", (char *)(S), SDL_strlen(S)+1)
|
||||
#define OS2_UTF8ToSys(S) SDL_iconv_string("", "UTF-8", (char *)(S), SDL_strlen(S)+1)
|
||||
#define libiconv_clean() do {} while(0)
|
||||
#else
|
||||
/* StrUTF8New() - geniconv/sys2utf8.c */
|
||||
#include "geniconv/geniconv.h"
|
||||
#define OS2_SysToUTF8(S) StrUTF8New(1, (S), SDL_strlen((S)) + 1)
|
||||
#define OS2_UTF8ToSys(S) StrUTF8New(0, (char *)(S), SDL_strlen((S)) + 1)
|
||||
#endif
|
||||
|
||||
/* SDL_OS2Quit() will be called from SDL_QuitSubSystem() */
|
||||
void SDL_OS2Quit(void);
|
||||
|
@@ -28,7 +28,7 @@
|
||||
#ifndef GENICONV_H
|
||||
#define GENICONV_H
|
||||
|
||||
#include <iconv.h>
|
||||
#include "iconv.h"
|
||||
|
||||
#ifdef iconv_open
|
||||
#undef iconv_open
|
||||
|
4
externals/SDL/src/core/os2/iconv2.lbc
vendored
Executable file
4
externals/SDL/src/core/os2/iconv2.lbc
vendored
Executable file
@@ -0,0 +1,4 @@
|
||||
# OpenWatcom exports file for libiconv
|
||||
++'libiconv'.'ICONV2'..'_libiconv'
|
||||
++'libiconv_close'.'ICONV2'..'_libiconv_close'
|
||||
++'libiconv_open'.'ICONV2'..'_libiconv_open'
|
Reference in New Issue
Block a user