Android: Scan on background thread and show progress
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
#include "android_host_interface.h"
|
||||
#include "android_progress_callback.h"
|
||||
#include "common/assert.h"
|
||||
#include "common/audio_stream.h"
|
||||
#include "common/file_system.h"
|
||||
@ -522,10 +523,10 @@ void AndroidHostInterface::SetControllerAxisState(u32 index, s32 button_code, fl
|
||||
false);
|
||||
}
|
||||
|
||||
void AndroidHostInterface::RefreshGameList(bool invalidate_cache, bool invalidate_database)
|
||||
void AndroidHostInterface::RefreshGameList(bool invalidate_cache, bool invalidate_database, ProgressCallback* progress_callback)
|
||||
{
|
||||
m_game_list->SetSearchDirectoriesFromSettings(m_settings_interface);
|
||||
m_game_list->Refresh(invalidate_cache, invalidate_database);
|
||||
m_game_list->Refresh(invalidate_cache, invalidate_database, progress_callback);
|
||||
}
|
||||
|
||||
void AndroidHostInterface::ApplySettings(bool display_osd_messages)
|
||||
@ -709,9 +710,10 @@ DEFINE_JNI_ARGS_METHOD(jint, AndroidHostInterface_getControllerAxisCode, jobject
|
||||
}
|
||||
|
||||
DEFINE_JNI_ARGS_METHOD(void, AndroidHostInterface_refreshGameList, jobject obj, jboolean invalidate_cache,
|
||||
jboolean invalidate_database)
|
||||
jboolean invalidate_database, jobject progress_callback)
|
||||
{
|
||||
AndroidHelpers::GetNativeClass(env, obj)->RefreshGameList(invalidate_cache, invalidate_database);
|
||||
AndroidProgressCallback cb(env, progress_callback);
|
||||
AndroidHelpers::GetNativeClass(env, obj)->RefreshGameList(invalidate_cache, invalidate_database, &cb);
|
||||
}
|
||||
|
||||
static const char* DiscRegionToString(DiscRegion region)
|
||||
|
||||
Reference in New Issue
Block a user