summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/android/power_android.cpp6
-rw-r--r--platform/haiku/haiku_application.cpp4
-rw-r--r--platform/haiku/haiku_direct_window.cpp4
-rw-r--r--platform/haiku/haiku_gl_view.cpp4
-rw-r--r--platform/haiku/power_haiku.cpp6
-rw-r--r--platform/iphone/export/export.cpp10
-rw-r--r--platform/iphone/os_iphone.cpp12
-rw-r--r--platform/iphone/power_iphone.cpp6
-rw-r--r--platform/javascript/dom_keys.h12
-rw-r--r--platform/javascript/power_javascript.cpp6
-rw-r--r--platform/osx/os_osx.mm2
-rw-r--r--platform/osx/power_osx.cpp6
-rw-r--r--platform/uwp/app.cpp18
-rw-r--r--platform/uwp/gl_context_egl.cpp14
-rw-r--r--platform/uwp/joypad_uwp.cpp6
-rw-r--r--platform/uwp/power_uwp.cpp6
-rw-r--r--platform/windows/crash_handler_win.cpp8
-rw-r--r--platform/windows/detect.py2
-rw-r--r--platform/windows/power_windows.cpp6
-rw-r--r--platform/x11/context_gl_x11.cpp4
-rw-r--r--platform/x11/os_x11.cpp7
-rw-r--r--platform/x11/power_x11.cpp6
22 files changed, 83 insertions, 72 deletions
diff --git a/platform/android/power_android.cpp b/platform/android/power_android.cpp
index 48c9377a5a..54fb435b62 100644
--- a/platform/android/power_android.cpp
+++ b/platform/android/power_android.cpp
@@ -245,8 +245,10 @@ int power_android::get_power_percent_left() {
}
}
-power_android::power_android()
- : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
+power_android::power_android() :
+ nsecs_left(-1),
+ percent_left(-1),
+ power_state(OS::POWERSTATE_UNKNOWN) {
}
power_android::~power_android() {
diff --git a/platform/haiku/haiku_application.cpp b/platform/haiku/haiku_application.cpp
index d23b9e27d8..e2649b15a4 100644
--- a/platform/haiku/haiku_application.cpp
+++ b/platform/haiku/haiku_application.cpp
@@ -29,6 +29,6 @@
/*************************************************************************/
#include "haiku_application.h"
-HaikuApplication::HaikuApplication()
- : BApplication("application/x-vnd.godot") {
+HaikuApplication::HaikuApplication() :
+ BApplication("application/x-vnd.godot") {
}
diff --git a/platform/haiku/haiku_direct_window.cpp b/platform/haiku/haiku_direct_window.cpp
index 24a8a4b17b..aa25064ccb 100644
--- a/platform/haiku/haiku_direct_window.cpp
+++ b/platform/haiku/haiku_direct_window.cpp
@@ -34,8 +34,8 @@
#include "main/main.h"
#include "os/keyboard.h"
-HaikuDirectWindow::HaikuDirectWindow(BRect p_frame)
- : BDirectWindow(p_frame, "Godot", B_TITLED_WINDOW, B_QUIT_ON_WINDOW_CLOSE) {
+HaikuDirectWindow::HaikuDirectWindow(BRect p_frame) :
+ BDirectWindow(p_frame, "Godot", B_TITLED_WINDOW, B_QUIT_ON_WINDOW_CLOSE) {
last_mouse_pos_valid = false;
last_buttons_state = 0;
last_button_mask = 0;
diff --git a/platform/haiku/haiku_gl_view.cpp b/platform/haiku/haiku_gl_view.cpp
index d898bd1a5d..bb9c439e94 100644
--- a/platform/haiku/haiku_gl_view.cpp
+++ b/platform/haiku/haiku_gl_view.cpp
@@ -30,8 +30,8 @@
#include "haiku_gl_view.h"
#include "main/main.h"
-HaikuGLView::HaikuGLView(BRect frame, uint32 type)
- : BGLView(frame, "GodotGLView", B_FOLLOW_ALL_SIDES, 0, type) {
+HaikuGLView::HaikuGLView(BRect frame, uint32 type) :
+ BGLView(frame, "GodotGLView", B_FOLLOW_ALL_SIDES, 0, type) {
}
void HaikuGLView::AttachedToWindow(void) {
diff --git a/platform/haiku/power_haiku.cpp b/platform/haiku/power_haiku.cpp
index 8718b317a3..73d60e9fec 100644
--- a/platform/haiku/power_haiku.cpp
+++ b/platform/haiku/power_haiku.cpp
@@ -64,8 +64,10 @@ int PowerX11::get_power_percent_left() {
}
}
-PowerHaiku::PowerHaiku()
- : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
+PowerHaiku::PowerHaiku() :
+ nsecs_left(-1),
+ percent_left(-1),
+ power_state(OS::POWERSTATE_UNKNOWN) {
}
PowerHaiku::~PowerHaiku() {
diff --git a/platform/iphone/export/export.cpp b/platform/iphone/export/export.cpp
index b05bb9ab09..444c9287ad 100644
--- a/platform/iphone/export/export.cpp
+++ b/platform/iphone/export/export.cpp
@@ -69,8 +69,9 @@ class EditorExportPlatformIOS : public EditorExportPlatform {
String name;
bool is_default;
- ExportArchitecture()
- : name(""), is_default(false) {
+ ExportArchitecture() :
+ name(""),
+ is_default(false) {
}
ExportArchitecture(String p_name, bool p_is_default) {
@@ -453,8 +454,9 @@ struct CodesignData {
const Ref<EditorExportPreset> &preset;
bool debug;
- CodesignData(const Ref<EditorExportPreset> &p_preset, bool p_debug)
- : preset(p_preset), debug(p_debug) {
+ CodesignData(const Ref<EditorExportPreset> &p_preset, bool p_debug) :
+ preset(p_preset),
+ debug(p_debug) {
}
};
diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp
index f06657cd7b..1c7f41b464 100644
--- a/platform/iphone/os_iphone.cpp
+++ b/platform/iphone/os_iphone.cpp
@@ -117,7 +117,7 @@ void OSIPhone::initialize(const VideoMode &p_desired, int p_video_driver, int p_
*/
visual_server->init();
- // visual_server->cursor_set_visible(false, 0);
+ //visual_server->cursor_set_visible(false, 0);
// reset this to what it should be, it will have been set to 0 after visual_server->init() is called
RasterizerStorageGLES3::system_fbo = gl_view_base_fb;
@@ -127,14 +127,6 @@ void OSIPhone::initialize(const VideoMode &p_desired, int p_video_driver, int p_
input = memnew(InputDefault);
-/*
-#ifdef IOS_SCORELOOP_ENABLED
- scoreloop = memnew(ScoreloopIOS);
- Engine::get_singleton()->add_singleton(Engine::Singleton("Scoreloop", scoreloop));
- scoreloop->connect();
-#endif
- */
-
#ifdef GAME_CENTER_ENABLED
game_center = memnew(GameCenter);
Engine::get_singleton()->add_singleton(Engine::Singleton("GameCenter", game_center));
@@ -149,7 +141,7 @@ void OSIPhone::initialize(const VideoMode &p_desired, int p_video_driver, int p_
#ifdef ICLOUD_ENABLED
icloud = memnew(ICloud);
Engine::get_singleton()->add_singleton(Engine::Singleton("ICloud", icloud));
-//icloud->connect();
+ //icloud->connect();
#endif
Engine::get_singleton()->add_singleton(Engine::Singleton("iOS", memnew(iOS)));
};
diff --git a/platform/iphone/power_iphone.cpp b/platform/iphone/power_iphone.cpp
index 055d31ef0a..03afdb15f9 100644
--- a/platform/iphone/power_iphone.cpp
+++ b/platform/iphone/power_iphone.cpp
@@ -58,8 +58,10 @@ int PowerIphone::get_power_percent_left() {
}
}
-PowerIphone::PowerIphone()
- : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
+PowerIphone::PowerIphone() :
+ nsecs_left(-1),
+ percent_left(-1),
+ power_state(OS::POWERSTATE_UNKNOWN) {
// TODO Auto-generated constructor stub
}
diff --git a/platform/javascript/dom_keys.h b/platform/javascript/dom_keys.h
index d63f165382..bd15cec603 100644
--- a/platform/javascript/dom_keys.h
+++ b/platform/javascript/dom_keys.h
@@ -262,7 +262,7 @@ int dom2godot_scancode(int dom_keycode) {
case DOM_VK_CAPS_LOCK:
return KEY_CAPSLOCK;
- /*
+ /*
case DOM_VK_KANA: return KEY_UNKNOWN;
case DOM_VK_HANGUL: return KEY_UNKNOWN;
case DOM_VK_EISU: return KEY_UNKNOWN;
@@ -274,7 +274,7 @@ int dom2godot_scancode(int dom_keycode) {
case DOM_VK_ESCAPE:
return KEY_ESCAPE;
- /*
+ /*
case DOM_VK_CONVERT: return KEY_UNKNOWN;
case DOM_VK_NONCONVERT: return KEY_UNKNOWN;
case DOM_VK_ACCEPT: return KEY_UNKNOWN;
@@ -292,7 +292,7 @@ int dom2godot_scancode(int dom_keycode) {
case DOM_VK_DOWN:
return KEY_DOWN;
- //case DOM_VK_SELECT: return KEY_UNKNOWN;
+ //case DOM_VK_SELECT: return KEY_UNKNOWN;
case DOM_VK_PRINTSCREEN: // this is the usual printScreen key
case DOM_VK_PRINT: // maybe for alt+printScreen or physical printers?
@@ -320,7 +320,7 @@ int dom2godot_scancode(int dom_keycode) {
case DOM_VK_DIVIDE:
return KEY_KP_DIVIDE;
- /*
+ /*
case DOM_VK_F17: return KEY_UNKNOWN;
case DOM_VK_F18: return KEY_UNKNOWN;
case DOM_VK_F19: return KEY_UNKNOWN;
@@ -335,7 +335,7 @@ int dom2godot_scancode(int dom_keycode) {
case DOM_VK_SCROLL_LOCK:
return KEY_SCROLLLOCK;
- /*
+ /*
case DOM_VK_WIN_OEM_FJ_JISHO: return KEY_UNKNOWN;
case DOM_VK_WIN_OEM_FJ_MASSHOU: return KEY_UNKNOWN;
case DOM_VK_WIN_OEM_FJ_TOUROKU: return KEY_UNKNOWN;
@@ -375,7 +375,7 @@ int dom2godot_scancode(int dom_keycode) {
case DOM_VK_QUOTE:
return KEY_APOSTROPHE;
- // rest is OEM/unusual
+ // rest is OEM/unusual
default: return KEY_UNKNOWN;
};
diff --git a/platform/javascript/power_javascript.cpp b/platform/javascript/power_javascript.cpp
index 10964502d4..54fceb75f4 100644
--- a/platform/javascript/power_javascript.cpp
+++ b/platform/javascript/power_javascript.cpp
@@ -63,8 +63,10 @@ int PowerJavascript::get_power_percent_left() {
}
}
-PowerJavascript::PowerJavascript()
- : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
+PowerJavascript::PowerJavascript() :
+ nsecs_left(-1),
+ percent_left(-1),
+ power_state(OS::POWERSTATE_UNKNOWN) {
}
PowerJavascript::~PowerJavascript() {
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index 732ec910c0..6cc8be250d 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -1028,7 +1028,7 @@ void OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_au
// OS X needs non-zero color size, so set resonable values
int colorBits = 32;
-// Fail if a robustness strategy was requested
+ // Fail if a robustness strategy was requested
#define ADD_ATTR(x) \
{ attributes[attributeCount++] = x; }
diff --git a/platform/osx/power_osx.cpp b/platform/osx/power_osx.cpp
index eed03e63c1..bd5f9fe65f 100644
--- a/platform/osx/power_osx.cpp
+++ b/platform/osx/power_osx.cpp
@@ -242,8 +242,10 @@ int power_osx::get_power_percent_left() {
}
}
-power_osx::power_osx()
- : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
+power_osx::power_osx() :
+ nsecs_left(-1),
+ percent_left(-1),
+ power_state(OS::POWERSTATE_UNKNOWN) {
}
power_osx::~power_osx() {
diff --git a/platform/uwp/app.cpp b/platform/uwp/app.cpp
index c565999d82..b47b99744e 100644
--- a/platform/uwp/app.cpp
+++ b/platform/uwp/app.cpp
@@ -77,15 +77,15 @@ public:
return 0;
}
-App::App()
- : mWindowClosed(false),
- mWindowVisible(true),
- mWindowWidth(0),
- mWindowHeight(0),
- mEglDisplay(EGL_NO_DISPLAY),
- mEglContext(EGL_NO_CONTEXT),
- mEglSurface(EGL_NO_SURFACE),
- number_of_contacts(0) {
+App::App() :
+ mWindowClosed(false),
+ mWindowVisible(true),
+ mWindowWidth(0),
+ mWindowHeight(0),
+ mEglDisplay(EGL_NO_DISPLAY),
+ mEglContext(EGL_NO_CONTEXT),
+ mEglSurface(EGL_NO_SURFACE),
+ number_of_contacts(0) {
}
// The first method called when the IFrameworkView is being created.
diff --git a/platform/uwp/gl_context_egl.cpp b/platform/uwp/gl_context_egl.cpp
index dafe5d5e25..2130af6d60 100644
--- a/platform/uwp/gl_context_egl.cpp
+++ b/platform/uwp/gl_context_egl.cpp
@@ -108,7 +108,8 @@ Error ContextEGL::initialize() {
EGL_NONE,*/
// These are the default display attributes, used to request ANGLE's D3D11 renderer.
// eglInitialize will only succeed with these attributes if the hardware supports D3D11 Feature Level 10_0+.
- EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
+ EGL_PLATFORM_ANGLE_TYPE_ANGLE,
+ EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE,
// EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER is an optimization that can have large performance benefits on mobile devices.
// Its syntax is subject to change, though. Please update your Visual Studio templates if you experience compilation issues with it.
@@ -117,7 +118,8 @@ Error ContextEGL::initialize() {
// EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE is an option that enables ANGLE to automatically call
// the IDXGIDevice3::Trim method on behalf of the application when it gets suspended.
// Calling IDXGIDevice3::Trim when an application is suspended is a Windows Store application certification requirement.
- EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE, EGL_TRUE,
+ EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE,
+ EGL_TRUE,
EGL_NONE,
};
@@ -190,10 +192,10 @@ void ContextEGL::cleanup() {
}
};
-ContextEGL::ContextEGL(CoreWindow ^ p_window)
- : mEglDisplay(EGL_NO_DISPLAY),
- mEglContext(EGL_NO_CONTEXT),
- mEglSurface(EGL_NO_SURFACE) {
+ContextEGL::ContextEGL(CoreWindow ^ p_window) :
+ mEglDisplay(EGL_NO_DISPLAY),
+ mEglContext(EGL_NO_CONTEXT),
+ mEglSurface(EGL_NO_SURFACE) {
window = p_window;
};
diff --git a/platform/uwp/joypad_uwp.cpp b/platform/uwp/joypad_uwp.cpp
index 0f84bd55a3..088d232e04 100644
--- a/platform/uwp/joypad_uwp.cpp
+++ b/platform/uwp/joypad_uwp.cpp
@@ -54,7 +54,7 @@ void JoypadUWP::process_controllers() {
case ControllerType::GAMEPAD_CONTROLLER: {
- GamepadReading reading = ((Gamepad ^)joy.controller_reference)->GetCurrentReading();
+ GamepadReading reading = ((Gamepad ^) joy.controller_reference)->GetCurrentReading();
int button_mask = (int)GamepadButtons::Menu;
for (int j = 0; j < 14; j++) {
@@ -161,7 +161,7 @@ void JoypadUWP::joypad_vibration_start(int p_device, float p_weak_magnitude, flo
GamepadVibration vibration;
vibration.LeftMotor = p_strong_magnitude;
vibration.RightMotor = p_weak_magnitude;
- ((Gamepad ^)joy.controller_reference)->Vibration = vibration;
+ ((Gamepad ^) joy.controller_reference)->Vibration = vibration;
joy.ff_timestamp = p_timestamp;
joy.ff_end_timestamp = p_duration == 0 ? 0 : p_timestamp + (uint64_t)(p_duration * 1000000.0);
@@ -175,7 +175,7 @@ void JoypadUWP::joypad_vibration_stop(int p_device, uint64_t p_timestamp) {
GamepadVibration vibration;
vibration.LeftMotor = 0.0;
vibration.RightMotor = 0.0;
- ((Gamepad ^)joy.controller_reference)->Vibration = vibration;
+ ((Gamepad ^) joy.controller_reference)->Vibration = vibration;
joy.ff_timestamp = p_timestamp;
joy.vibrating = false;
diff --git a/platform/uwp/power_uwp.cpp b/platform/uwp/power_uwp.cpp
index 81e97b1391..14fce8b133 100644
--- a/platform/uwp/power_uwp.cpp
+++ b/platform/uwp/power_uwp.cpp
@@ -30,8 +30,10 @@
#include "power_uwp.h"
-PowerUWP::PowerUWP()
- : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
+PowerUWP::PowerUWP() :
+ nsecs_left(-1),
+ percent_left(-1),
+ power_state(OS::POWERSTATE_UNKNOWN) {
}
PowerUWP::~PowerUWP() {
diff --git a/platform/windows/crash_handler_win.cpp b/platform/windows/crash_handler_win.cpp
index feea3911b2..5657036693 100644
--- a/platform/windows/crash_handler_win.cpp
+++ b/platform/windows/crash_handler_win.cpp
@@ -61,8 +61,8 @@ class symbol {
static const int max_name_len = 1024;
public:
- symbol(HANDLE process, DWORD64 address)
- : sym((sym_type *)::operator new(sizeof(*sym) + max_name_len)) {
+ symbol(HANDLE process, DWORD64 address) :
+ sym((sym_type *)::operator new(sizeof(*sym) + max_name_len)) {
memset(sym, '\0', sizeof(*sym) + max_name_len);
sym->SizeOfStruct = sizeof(*sym);
sym->MaxNameLength = max_name_len;
@@ -85,8 +85,8 @@ class get_mod_info {
HANDLE process;
public:
- get_mod_info(HANDLE h)
- : process(h) {}
+ get_mod_info(HANDLE h) :
+ process(h) {}
module_data operator()(HMODULE module) {
module_data ret;
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 890decf962..d85e1b061c 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -270,7 +270,7 @@ def configure(env):
env.Append(CCFLAGS=['-DOPENGL_ENABLED'])
env.Append(CCFLAGS=['-DRTAUDIO_ENABLED'])
env.Append(CCFLAGS=['-DWASAPI_ENABLED'])
- env.Append(CCFLAGS=['-DWINVER=%s' % winver, '-D_WIN32_WINNT=%s' % winver])
+ env.Append(CCFLAGS=['-DWINVER=%s' % env['target_win_version'], '-D_WIN32_WINNT=%s' % env['target_win_version']])
env.Append(LIBS=['mingw32', 'opengl32', 'dsound', 'ole32', 'd3d9', 'winmm', 'gdi32', 'iphlpapi', 'shlwapi', 'wsock32', 'ws2_32', 'kernel32', 'oleaut32', 'dinput8', 'dxguid', 'ksuser'])
env.Append(CPPFLAGS=['-DMINGW_ENABLED'])
diff --git a/platform/windows/power_windows.cpp b/platform/windows/power_windows.cpp
index 8d86f160f1..cc452d774d 100644
--- a/platform/windows/power_windows.cpp
+++ b/platform/windows/power_windows.cpp
@@ -121,8 +121,10 @@ int PowerWindows::get_power_percent_left() {
}
}
-PowerWindows::PowerWindows()
- : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
+PowerWindows::PowerWindows() :
+ nsecs_left(-1),
+ percent_left(-1),
+ power_state(OS::POWERSTATE_UNKNOWN) {
}
PowerWindows::~PowerWindows() {
diff --git a/platform/x11/context_gl_x11.cpp b/platform/x11/context_gl_x11.cpp
index 4f9d4a84b9..61c6b3c9dd 100644
--- a/platform/x11/context_gl_x11.cpp
+++ b/platform/x11/context_gl_x11.cpp
@@ -228,8 +228,8 @@ bool ContextGL_X11::is_using_vsync() const {
return use_vsync;
}
-ContextGL_X11::ContextGL_X11(::Display *p_x11_display, ::Window &p_x11_window, const OS::VideoMode &p_default_video_mode, bool p_opengl_3_context)
- : x11_window(p_x11_window) {
+ContextGL_X11::ContextGL_X11(::Display *p_x11_display, ::Window &p_x11_window, const OS::VideoMode &p_default_video_mode, bool p_opengl_3_context) :
+ x11_window(p_x11_window) {
default_video_mode = p_default_video_mode;
x11_display = p_x11_display;
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index bf63921b06..c210a03688 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -132,10 +132,9 @@ void OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_au
// Try to support IME if detectable auto-repeat is supported
if (xkb_dar == True) {
-// Xutf8LookupString will be used later instead of XmbLookupString before
-// the multibyte sequences can be converted to unicode string.
-
#ifdef X_HAVE_UTF8_STRING
+ // Xutf8LookupString will be used later instead of XmbLookupString before
+ // the multibyte sequences can be converted to unicode string.
modifiers = XSetLocaleModifiers("");
#endif
}
@@ -548,7 +547,7 @@ void OS_X11::finalize() {
memdelete(main_loop);
main_loop = NULL;
-/*
+ /*
if (debugger_connection_console) {
memdelete(debugger_connection_console);
}
diff --git a/platform/x11/power_x11.cpp b/platform/x11/power_x11.cpp
index 76ff7f91fb..0ef2629cb0 100644
--- a/platform/x11/power_x11.cpp
+++ b/platform/x11/power_x11.cpp
@@ -542,8 +542,10 @@ bool PowerX11::UpdatePowerInfo() {
return false;
}
-PowerX11::PowerX11()
- : nsecs_left(-1), percent_left(-1), power_state(OS::POWERSTATE_UNKNOWN) {
+PowerX11::PowerX11() :
+ nsecs_left(-1),
+ percent_left(-1),
+ power_state(OS::POWERSTATE_UNKNOWN) {
}
PowerX11::~PowerX11() {