mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-21 14:55:39 +00:00
Initialize interface structures so they can be extended in the future
We guarantee that we will only add to the end of these interfaces, and any new fields will be optional.
This commit is contained in:
@@ -437,7 +437,7 @@ static int iostrm_testAllocFree(void *arg)
|
||||
SDL_IOStreamInterface iface;
|
||||
SDL_IOStream *rw;
|
||||
|
||||
SDL_zero(iface);
|
||||
SDL_INIT_INTERFACE(&iface);
|
||||
rw = SDL_OpenIO(&iface, NULL);
|
||||
SDLTest_AssertPass("Call to SDL_OpenIO() succeeded");
|
||||
SDLTest_AssertCheck(rw != NULL, "Validate result from SDL_OpenIO() is not NULL");
|
||||
|
||||
@@ -27,7 +27,7 @@ static int TestVirtualJoystick(void *arg)
|
||||
|
||||
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
|
||||
|
||||
SDL_zero(desc);
|
||||
SDL_INIT_INTERFACE(&desc);
|
||||
desc.type = SDL_JOYSTICK_TYPE_GAMEPAD;
|
||||
desc.naxes = SDL_GAMEPAD_AXIS_MAX;
|
||||
desc.nbuttons = SDL_GAMEPAD_BUTTON_MAX;
|
||||
|
||||
@@ -1159,7 +1159,7 @@ static void OpenVirtualGamepad(void)
|
||||
return;
|
||||
}
|
||||
|
||||
SDL_zero(desc);
|
||||
SDL_INIT_INTERFACE(&desc);
|
||||
desc.type = SDL_JOYSTICK_TYPE_GAMEPAD;
|
||||
desc.naxes = SDL_GAMEPAD_AXIS_MAX;
|
||||
desc.nbuttons = SDL_GAMEPAD_BUTTON_MAX;
|
||||
|
||||
Reference in New Issue
Block a user