mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
ios Support
This commit is contained in:
parent
a5fe6cc80b
commit
da8bcdd2dd
@ -25,6 +25,9 @@
|
||||
#ifdef VCMI_ANDROID
|
||||
#include "../../lib/CAndroidVMHelper.h"
|
||||
#endif
|
||||
#ifdef VCMI_IOS
|
||||
#include "../ios/utils.h"
|
||||
#endif
|
||||
|
||||
#include <SDL_events.h>
|
||||
#include <SDL_hints.h>
|
||||
@ -299,4 +302,7 @@ void InputSourceTouch::hapticFeedback() {
|
||||
CAndroidVMHelper vmHelper;
|
||||
vmHelper.callStaticVoidMethod(CAndroidVMHelper::NATIVE_METHODS_DEFAULT_CLASS, "hapticFeedback");
|
||||
#endif
|
||||
#if defined(VCMI_IOS)
|
||||
iOS_utils::hapticFeedback();
|
||||
#endif
|
||||
}
|
||||
|
@ -15,4 +15,6 @@ double screenScale();
|
||||
|
||||
void showLoadingIndicator();
|
||||
void hideLoadingIndicator();
|
||||
|
||||
void hapticFeedback();
|
||||
}
|
||||
|
@ -43,4 +43,11 @@ void hideLoadingIndicator()
|
||||
[indicator removeFromSuperview];
|
||||
indicator = nil;
|
||||
}
|
||||
|
||||
void hapticFeedback()
|
||||
{
|
||||
UIImpactFeedbackGenerator *hapticGen = [[UIImpactFeedbackGenerator alloc] initWithStyle:(UIImpactFeedbackStyleLight)];
|
||||
[hapticGen impactOccurred];
|
||||
hapticGen = NULL;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user