Refactor PROVIDER_ID_GOOGLE to PROVIDER_ID_APPLE in iap.h and iap_android.cpp
This commit is contained in:
parent
75e1dc9515
commit
2d8a6496b5
@ -36,9 +36,7 @@ enum BillingResponse
|
|||||||
enum ProviderId
|
enum ProviderId
|
||||||
{
|
{
|
||||||
PROVIDER_ID_GOOGLE = 0,
|
PROVIDER_ID_GOOGLE = 0,
|
||||||
PROVIDER_ID_AMAZON = 1,
|
PROVIDER_ID_APPLE = 1,
|
||||||
PROVIDER_ID_APPLE = 2,
|
|
||||||
PROVIDER_ID_FACEBOOK = 3,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DM_IAP_EXTENSION
|
#endif // DM_IAP_EXTENSION
|
||||||
|
@ -16,10 +16,8 @@ struct IAP
|
|||||||
{
|
{
|
||||||
memset(this, 0, sizeof(*this));
|
memset(this, 0, sizeof(*this));
|
||||||
m_autoFinishTransactions = true;
|
m_autoFinishTransactions = true;
|
||||||
m_ProviderId = PROVIDER_ID_GOOGLE;
|
|
||||||
}
|
}
|
||||||
bool m_autoFinishTransactions;
|
bool m_autoFinishTransactions;
|
||||||
int m_ProviderId;
|
|
||||||
|
|
||||||
dmScript::LuaCallbackInfo* m_Listener;
|
dmScript::LuaCallbackInfo* m_Listener;
|
||||||
|
|
||||||
@ -238,7 +236,7 @@ static int IAP_GetProviderId(lua_State* L)
|
|||||||
{
|
{
|
||||||
DM_LUA_STACK_CHECK(L, 1);
|
DM_LUA_STACK_CHECK(L, 1);
|
||||||
|
|
||||||
lua_pushinteger(L, g_IAP.m_ProviderId);
|
lua_pushinteger(L, PROVIDER_ID_GOOGLE);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -395,8 +393,6 @@ static dmExtension::Result InitializeIAP(dmExtension::Params* params)
|
|||||||
const char* provider = dmConfigFile::GetString(params->m_ConfigFile, "android.iap_provider", "GooglePlay");
|
const char* provider = dmConfigFile::GetString(params->m_ConfigFile, "android.iap_provider", "GooglePlay");
|
||||||
const char* class_name = "com.defold.iap.IapGooglePlay";
|
const char* class_name = "com.defold.iap.IapGooglePlay";
|
||||||
|
|
||||||
g_IAP.m_ProviderId = PROVIDER_ID_GOOGLE;
|
|
||||||
|
|
||||||
jclass iap_class = dmAndroid::LoadClass(env, class_name);
|
jclass iap_class = dmAndroid::LoadClass(env, class_name);
|
||||||
jclass iap_jni_class = dmAndroid::LoadClass(env, "com.defold.iap.IapJNI");
|
jclass iap_jni_class = dmAndroid::LoadClass(env, "com.defold.iap.IapJNI");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user