Skip to content

Commit 5b3f345

Browse files
committed
Updated Android Studio project
1 parent 1ff8958 commit 5b3f345

File tree

3 files changed

+38
-38
lines changed

3 files changed

+38
-38
lines changed

platform/android/NativeEngine.cpp

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -221,57 +221,57 @@ void NativeEngine::gameLoop() {
221221
//mApp->onInputEvent = _handle_input_proxy;
222222

223223
GameActivity_setWindowFlags(mApp->activity,
224-
AWINDOW_FLAG_KEEP_SCREEN_ON | AWINDOW_FLAG_TURN_SCREEN_ON |
225-
AWINDOW_FLAG_FULLSCREEN |
226-
AWINDOW_FLAG_SHOW_WHEN_LOCKED,
227-
0);
224+
AWINDOW_FLAG_KEEP_SCREEN_ON | AWINDOW_FLAG_TURN_SCREEN_ON |
225+
AWINDOW_FLAG_FULLSCREEN |
226+
AWINDOW_FLAG_SHOW_WHEN_LOCKED,
227+
0);
228228
updateSystemBarOffset();
229229

230230
while (1) {
231231
int events;
232232
struct android_poll_source *source;
233-
// If not animating, block until we get an event; if animating, don't block.
234-
while ((ALooper_pollAll(isAnimating() ? 0 : -1, NULL, &events, (void **) &source)) >= 0) {
235-
236-
// process event
237-
if (source != NULL) {
238-
source->process(mApp, source);
239-
}
240-
241-
// are we exiting?
242-
if (mApp->destroyRequested) {
243-
return;
244-
}
233+
234+
// If not animating, block until we get an event; if animating, don't block.
235+
while ((ALooper_pollOnce(isAnimating() ? 0 : -1, NULL, &events, (void **) &source)) >= 0) {
236+
// process event
237+
if (source != NULL) {
238+
source->process(mApp, source);
239+
}
240+
241+
// are we exiting?
242+
if (mApp->destroyRequested) {
243+
return;
244+
}
245245
}
246246

247247
handleGameActivityInput();
248248

249249
if (mApp->textInputState) {
250-
GameActivity_getTextInputState(mApp->activity, [](void *context, const GameTextInputState *state) {
251-
if (!context || !state) return;
250+
GameActivity_getTextInputState(mApp->activity, [](void *context, const GameTextInputState *state) {
251+
if (!context || !state) return;
252252

253-
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> convert;
254-
std::wstring utf16Text = convert.from_bytes(state->text_UTF8);
253+
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> convert;
254+
std::wstring utf16Text = convert.from_bytes(state->text_UTF8);
255255

256-
while (textInputBuffer.length() > utf16Text.length()){
257-
textInputBuffer.pop_back();
258-
Supernova::Engine::systemCharInput('\b');
259-
}
256+
while (textInputBuffer.length() > utf16Text.length()){
257+
textInputBuffer.pop_back();
258+
Supernova::Engine::systemCharInput('\b');
259+
}
260260

261-
int pos = 0;
262-
while (textInputBuffer[pos] == utf16Text[pos] and pos < textInputBuffer.length()){
263-
pos++;
264-
}
261+
int pos = 0;
262+
while (textInputBuffer[pos] == utf16Text[pos] and pos < textInputBuffer.length()){
263+
pos++;
264+
}
265265

266-
for (int i = pos; i < textInputBuffer.length(); i++){
267-
Supernova::Engine::systemCharInput('\b');
268-
}
269-
for (int i = pos; i < utf16Text.length(); i++){
270-
Supernova::Engine::systemCharInput(utf16Text[i]);
271-
}
272-
textInputBuffer = utf16Text;
266+
for (int i = pos; i < textInputBuffer.length(); i++){
267+
Supernova::Engine::systemCharInput('\b');
268+
}
269+
for (int i = pos; i < utf16Text.length(); i++){
270+
Supernova::Engine::systemCharInput(utf16Text[i]);
271+
}
272+
textInputBuffer = utf16Text;
273273

274-
}, this);
274+
}, this);
275275
mApp->textInputState = 0;
276276
}
277277

workspaces/androidstudio/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
mavenCentral()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:8.6.0'
9+
classpath 'com.android.tools.build:gradle:8.7.3'
1010

1111
// NOTE: Do not place your application dependencies here; they belong
1212
// in the individual module build.gradle files

workspaces/androidstudio/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip

0 commit comments

Comments
 (0)