diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-04-18 11:43:54 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-04-18 11:43:54 -0300 |
commit | 0360b454a432dc851cc1c5b0c365049ebafcec46 (patch) | |
tree | c868fbef7de718007e671448865a75381b8c8302 /platform | |
parent | b8593c6f3fd4726584e56e684c9ebb5a8147ff0c (diff) |
-Fixed viewport stretch bugs
-Fixed input in viewport stretch bugs
-Fixed tilemap pixel overlap (really?)
Diffstat (limited to 'platform')
8 files changed, 46 insertions, 11 deletions
diff --git a/platform/android/java/src/com/android/godot/payments/ConsumeTask.java b/platform/android/java/src/com/android/godot/payments/ConsumeTask.java index 62b33c002a..855bc0578d 100644 --- a/platform/android/java/src/com/android/godot/payments/ConsumeTask.java +++ b/platform/android/java/src/com/android/godot/payments/ConsumeTask.java @@ -56,7 +56,8 @@ abstract public class ConsumeTask { protected void onPostExecute(String param){ if(param == null){ - success(); + + success(new PaymentsCache(context).getConsumableValue("ticket", sku)); }else{ error(param); } @@ -65,7 +66,7 @@ abstract public class ConsumeTask { }.execute(); } - abstract protected void success(); + abstract protected void success(String ticket); abstract protected void error(String message); } diff --git a/platform/android/java/src/com/android/godot/payments/HandlePurchaseTask.java b/platform/android/java/src/com/android/godot/payments/HandlePurchaseTask.java index 531a786dc9..a32ecf2895 100644 --- a/platform/android/java/src/com/android/godot/payments/HandlePurchaseTask.java +++ b/platform/android/java/src/com/android/godot/payments/HandlePurchaseTask.java @@ -28,11 +28,12 @@ abstract public class HandlePurchaseTask { public void handlePurchaseRequest(int resultCode, Intent data){ -// Log.d("XXX", "Handling purchase response"); + Log.d("XXX", "Handling purchase response"); // int responseCode = data.getIntExtra("RESPONSE_CODE", 0); PaymentsCache pc = new PaymentsCache(context); String purchaseData = data.getStringExtra("INAPP_PURCHASE_DATA"); + Log.d("XXX", "Purchase data:" + purchaseData); // String dataSignature = data.getStringExtra("INAPP_DATA_SIGNATURE"); if (resultCode == Activity.RESULT_OK) { @@ -61,7 +62,7 @@ abstract public class HandlePurchaseTask { pc.setConsumableFlag("block", productId, true); pc.setConsumableValue("token", productId, purchaseToken); - success(purchaseData); + success(productId); return; } catch (JSONException e) { error(e.getMessage()); diff --git a/platform/android/java/src/com/android/godot/payments/PaymentsManager.java b/platform/android/java/src/com/android/godot/payments/PaymentsManager.java index 983f655c35..e8c487dbd8 100644 --- a/platform/android/java/src/com/android/godot/payments/PaymentsManager.java +++ b/platform/android/java/src/com/android/godot/payments/PaymentsManager.java @@ -84,8 +84,25 @@ public class PaymentsManager { new HandlePurchaseTask(activity){ @Override - protected void success(String ticket) { - godotPaymentV3.callbackSuccess(ticket); + protected void success(final String sku) { + new ConsumeTask(mService, activity) { + + @Override + protected void success(String ticket) { +// godotPaymentV3.callbackSuccess(""); + godotPaymentV3.callbackSuccess(ticket); + } + + @Override + protected void error(String message) { + godotPaymentV3.callbackFail(); + + } + }.consume(sku); + + + +// godotPaymentV3.callbackSuccess(ticket); //validatePurchase(purchaseToken, sku); } @@ -99,7 +116,8 @@ public class PaymentsManager { protected void canceled() { godotPaymentV3.callbackCancel(); - }}.handlePurchaseRequest(resultCode, data); + } + }.handlePurchaseRequest(resultCode, data); } public void validatePurchase(String purchaseToken, final String sku){ @@ -112,8 +130,8 @@ public class PaymentsManager { new ConsumeTask(mService, activity) { @Override - protected void success() { - godotPaymentV3.callbackSuccess(""); + protected void success(String ticket) { + godotPaymentV3.callbackSuccess(ticket); } diff --git a/platform/android/java/src/com/android/godot/payments/PurchaseTask.java b/platform/android/java/src/com/android/godot/payments/PurchaseTask.java index 3b2cb78d27..f5d8a0298a 100644 --- a/platform/android/java/src/com/android/godot/payments/PurchaseTask.java +++ b/platform/android/java/src/com/android/godot/payments/PurchaseTask.java @@ -32,7 +32,7 @@ abstract public class PurchaseTask { private boolean isLooping = false; public void purchase(final String sku){ -// Log.d("XXX", "Starting purchase"); + Log.d("XXX", "Starting purchase for: " + sku); PaymentsCache pc = new PaymentsCache(context); Boolean isBlocked = pc.getConsumableFlag("block", sku); // if(isBlocked){ @@ -68,7 +68,7 @@ abstract public class PurchaseTask { new ConsumeTask(mService, context) { @Override - protected void success() { + protected void success(String ticket) { // Log.d("XXX", "Product was erroniously purchased!"); if(isLooping){ // Log.d("XXX", "It is looping"); diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 9871ecba8b..64219d6c17 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -1647,6 +1647,13 @@ void OS_Windows::move_window_to_foreground() { } +Error OS_Windows::shell_open(String p_uri) { + + ShellExecuteW(NULL, L"open", p_uri.c_str(), NULL, NULL, SW_SHOWNORMAL); + return OK; +} + + String OS_Windows::get_locale() const { const _WinLocale *wl = &_win_locales[0]; diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index 6d75ca8d7b..365808d175 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -246,6 +246,8 @@ public: virtual void make_rendering_thread(); virtual void swap_buffers(); + virtual Error shell_open(String p_uri); + void run(); virtual bool get_swap_ok_cancel() { return true; } diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index ff34d8eb2e..2cb8247799 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -1015,6 +1015,11 @@ String OS_X11::get_name() { return "X11"; } +Error OS_X11::shell_open(String p_uri) { + + +} + void OS_X11::close_joystick(int p_id) { diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h index ee50bdea4a..491b8fa00d 100644 --- a/platform/x11/os_x11.h +++ b/platform/x11/os_x11.h @@ -188,6 +188,7 @@ public: virtual void make_rendering_thread(); virtual void swap_buffers(); + virtual Error shell_open(String p_uri); virtual void set_video_mode(const VideoMode& p_video_mode,int p_screen=0); virtual VideoMode get_video_mode(int p_screen=0) const; |