mirror of https://github.com/libsdl-org/SDL.git
Removed SDL_DROPEVENT_DATA_SIZE and SDL_TEXTEDITINGEVENT_TEXT_SIZE
Fixes https://github.com/libsdl-org/SDL/issues/9681
This commit is contained in:
parent
63979f04c8
commit
b18a071639
|
|
@ -398,7 +398,9 @@ The following symbols have been renamed:
|
||||||
* SDL_USEREVENT => SDL_EVENT_USER
|
* SDL_USEREVENT => SDL_EVENT_USER
|
||||||
|
|
||||||
The following symbols have been removed:
|
The following symbols have been removed:
|
||||||
|
* SDL_DROPEVENT_DATA_SIZE - drop event data is dynamically allocated
|
||||||
* SDL_SYSWMEVENT - you can use SDL_SetWindowsMessageHook() and SDL_SetX11EventHook() to watch and modify system events before SDL sees them.
|
* SDL_SYSWMEVENT - you can use SDL_SetWindowsMessageHook() and SDL_SetX11EventHook() to watch and modify system events before SDL sees them.
|
||||||
|
* SDL_TEXTEDITINGEVENT_TEXT_SIZE - text editing event data is dynamically allocated
|
||||||
|
|
||||||
The following structures have been renamed:
|
The following structures have been renamed:
|
||||||
* SDL_ControllerAxisEvent => SDL_GamepadAxisEvent
|
* SDL_ControllerAxisEvent => SDL_GamepadAxisEvent
|
||||||
|
|
|
||||||
|
|
@ -313,8 +313,6 @@ typedef struct SDL_KeyboardEvent
|
||||||
SDL_Keysym keysym; /**< The key that was pressed or released */
|
SDL_Keysym keysym; /**< The key that was pressed or released */
|
||||||
} SDL_KeyboardEvent;
|
} SDL_KeyboardEvent;
|
||||||
|
|
||||||
#define SDL_TEXTEDITINGEVENT_TEXT_SIZE 64
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Keyboard text editing event structure (event.edit.*)
|
* Keyboard text editing event structure (event.edit.*)
|
||||||
*
|
*
|
||||||
|
|
@ -664,8 +662,6 @@ typedef struct SDL_TouchFingerEvent
|
||||||
} SDL_TouchFingerEvent;
|
} SDL_TouchFingerEvent;
|
||||||
|
|
||||||
|
|
||||||
#define SDL_DROPEVENT_DATA_SIZE 64
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pressure-sensitive pen touched or stopped touching surface (event.ptip.*)
|
* Pressure-sensitive pen touched or stopped touching surface (event.ptip.*)
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -2296,7 +2296,6 @@ static void text_input_preedit_string(void *data,
|
||||||
int32_t cursor_end)
|
int32_t cursor_end)
|
||||||
{
|
{
|
||||||
SDL_WaylandTextInput *text_input = data;
|
SDL_WaylandTextInput *text_input = data;
|
||||||
char buf[SDL_TEXTEDITINGEVENT_TEXT_SIZE];
|
|
||||||
text_input->has_preedit = SDL_TRUE;
|
text_input->has_preedit = SDL_TRUE;
|
||||||
if (text) {
|
if (text) {
|
||||||
int cursor_begin_utf8 = cursor_begin >= 0 ? (int)SDL_utf8strnlen(text, cursor_begin) : -1;
|
int cursor_begin_utf8 = cursor_begin >= 0 ? (int)SDL_utf8strnlen(text, cursor_begin) : -1;
|
||||||
|
|
@ -2313,8 +2312,7 @@ static void text_input_preedit_string(void *data,
|
||||||
}
|
}
|
||||||
SDL_SendEditingText(text, cursor_begin_utf8, cursor_size_utf8);
|
SDL_SendEditingText(text, cursor_begin_utf8, cursor_size_utf8);
|
||||||
} else {
|
} else {
|
||||||
buf[0] = '\0';
|
SDL_SendEditingText("", 0, 0);
|
||||||
SDL_SendEditingText(buf, 0, 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue