|
@@ -3,6 +3,7 @@ |
|
|
|
|
|
|
|
|
#include <bdd-for-c-mocks.h> |
|
|
#include <bdd-for-c-mocks.h> |
|
|
#include <SDL_joystick.h> |
|
|
#include <SDL_joystick.h> |
|
|
|
|
|
#include <SDL_rwops.h> |
|
|
#include "../../../src/packages/common/IZ_common.h" |
|
|
#include "../../../src/packages/common/IZ_common.h" |
|
|
|
|
|
|
|
|
#define MOCK_OPEN_JOYSTICKS 1 |
|
|
#define MOCK_OPEN_JOYSTICKS 1 |
|
@@ -30,4 +31,13 @@ mock(SDL_JoystickGetGUID) SDL_JoystickGUID SDL_JoystickGetGUID(SDL_Joystick* joy |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
mock(SDL_GameControllerAddMappingsFromRW) int SDL_GameControllerAddMappingsFromRW(SDL_RWops *rw, int freerw) { |
|
|
|
|
|
mock_return(SDL_GameControllerAddMappingsFromRW) 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
mock(SDL_JoystickFromInstanceID) SDL_Joystick* SDL_JoystickFromInstanceID(SDL_JoystickID instance_id) { |
|
|
|
|
|
static void* joystick = (void*) 1; |
|
|
|
|
|
mock_return(SDL_JoystickFromInstanceID) (SDL_Joystick*) &joystick; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
#endif |
|
|
#endif |