Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Android: Avoid a few string copies
  • Loading branch information
hrydgard committed Feb 26, 2026
commit a03e112a8083c379dbeab3bb4c1b799afab75687
8 changes: 4 additions & 4 deletions android/jni/app-android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ static void EmuThreadFunc() {
ERROR_LOG(Log::System, "No activity, clearing commands");
while (!frameCommands.empty())
frameCommands.pop();
return;
break;
}
// Still under lock here.
ProcessFrameCommands(env);
Expand Down Expand Up @@ -1635,9 +1635,7 @@ extern "C" void JNICALL Java_org_ppsspp_ppsspp_NativeApp_pushCameraImageAndroid(
// Call this under frameCommandLock.
static void ProcessFrameCommands(JNIEnv *env) {
while (!frameCommands.empty()) {
FrameCommand frameCmd;
frameCmd = frameCommands.front();
frameCommands.pop();
const FrameCommand &frameCmd = frameCommands.front();

DEBUG_LOG(Log::System, "frameCommand '%s' '%s'", frameCmd.command.c_str(), frameCmd.params.c_str());

Expand All @@ -1646,6 +1644,8 @@ static void ProcessFrameCommands(JNIEnv *env) {
env->CallVoidMethod(ppssppActivity, postCommand, cmd, param);
env->DeleteLocalRef(cmd);
env->DeleteLocalRef(param);

frameCommands.pop();
}
}

Expand Down