Platform: Ensure classes match their header filename

Also drop some unused files.

Renamed:
- `platform/iphone/sem_iphone.h` -> `semaphore_iphone.h`
  (same for `osx`)
- `platform/uwp/gl_context_egl.h` -> `context_egl_uwp.h`
- in `platform/windows`: `context_gl_win.h`, `crash_handler_win.h`,
  `godot_win.cpp`, `joypad.h` and `key_mapping_win.h` all renamed to
  use `windows`. Some classes renamed accordingly too.
- `EditorExportAndroid` and `EditorExportUWP` renamed to
  `EditorExportPlatformAndroid` and `EditorExportPlatformUWP`
- `power_android` and `power_osx` renamed to `PowerAndroid` and
  `PowerOSX`
- `OSUWP` renamed to `OS_UWP`

Dropped:
- `platform/windows/ctxgl_procaddr.h`
This commit is contained in:
Rémi Verschelde
2019-02-12 15:43:54 +01:00
parent 75dae1b9a9
commit bc26d0d6cd
49 changed files with 264 additions and 478 deletions

View File

@@ -206,9 +206,9 @@ static const LauncherIcon launcher_icons[] = {
{ "launcher_icons/mdpi_48x48", "res/drawable-mdpi-v4/icon.png" }
};
class EditorExportAndroid : public EditorExportPlatform {
class EditorExportPlatformAndroid : public EditorExportPlatform {
GDCLASS(EditorExportAndroid, EditorExportPlatform)
GDCLASS(EditorExportPlatformAndroid, EditorExportPlatform)
Ref<ImageTexture> logo;
Ref<ImageTexture> run_icon;
@@ -235,7 +235,7 @@ class EditorExportAndroid : public EditorExportPlatform {
static void _device_poll_thread(void *ud) {
EditorExportAndroid *ea = (EditorExportAndroid *)ud;
EditorExportPlatformAndroid *ea = (EditorExportPlatformAndroid *)ud;
while (!ea->quit_request) {
@@ -1925,7 +1925,7 @@ public:
virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) {
}
EditorExportAndroid() {
EditorExportPlatformAndroid() {
Ref<Image> img = memnew(Image(_android_logo));
logo.instance();
@@ -1941,7 +1941,7 @@ public:
device_thread = Thread::create(_device_poll_thread, this);
}
~EditorExportAndroid() {
~EditorExportPlatformAndroid() {
quit_request = true;
Thread::wait_to_finish(device_thread);
memdelete(device_lock);
@@ -1969,6 +1969,6 @@ void register_android_exporter() {
EDITOR_DEF("export/android/timestamping_authority_url", "");
EDITOR_DEF("export/android/shutdown_adb_on_exit", true);
Ref<EditorExportAndroid> exporter = Ref<EditorExportAndroid>(memnew(EditorExportAndroid));
Ref<EditorExportPlatformAndroid> exporter = Ref<EditorExportPlatformAndroid>(memnew(EditorExportPlatformAndroid));
EditorExport::get_singleton()->add_export_platform(exporter);
}

View File

@@ -175,7 +175,7 @@ Error OS_Android::initialize(const VideoMode &p_desired, int p_video_driver, int
input = memnew(InputDefault);
input->set_fallback_mapping("Default Android Gamepad");
//power_manager = memnew(power_android);
//power_manager = memnew(PowerAndroid);
return OK;
}

View File

@@ -134,7 +134,7 @@ private:
SetKeepScreenOnFunc set_keep_screen_on_func;
AlertFunc alert_func;
//power_android *power_manager;
//PowerAndroid *power_manager;
int video_driver_index;
public:

View File

@@ -190,7 +190,7 @@ int Android_JNI_GetPowerInfo(int *plugged, int *charged, int *battery, int *seco
return 0;
}
bool power_android::GetPowerInfo_Android() {
bool PowerAndroid::GetPowerInfo_Android() {
int battery;
int plugged;
int charged;
@@ -218,7 +218,7 @@ bool power_android::GetPowerInfo_Android() {
return true;
}
OS::PowerState power_android::get_power_state() {
OS::PowerState PowerAndroid::get_power_state() {
if (GetPowerInfo_Android()) {
return power_state;
} else {
@@ -227,7 +227,7 @@ OS::PowerState power_android::get_power_state() {
}
}
int power_android::get_power_seconds_left() {
int PowerAndroid::get_power_seconds_left() {
if (GetPowerInfo_Android()) {
return nsecs_left;
} else {
@@ -236,7 +236,7 @@ int power_android::get_power_seconds_left() {
}
}
int power_android::get_power_percent_left() {
int PowerAndroid::get_power_percent_left() {
if (GetPowerInfo_Android()) {
return percent_left;
} else {
@@ -245,11 +245,11 @@ int power_android::get_power_percent_left() {
}
}
power_android::power_android() :
PowerAndroid::PowerAndroid() :
nsecs_left(-1),
percent_left(-1),
power_state(OS::POWERSTATE_UNKNOWN) {
}
power_android::~power_android() {
PowerAndroid::~PowerAndroid() {
}

View File

@@ -28,13 +28,14 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#ifndef PLATFORM_ANDROID_POWER_ANDROID_H_
#define PLATFORM_ANDROID_POWER_ANDROID_H_
#ifndef POWER_ANDROID_H
#define POWER_ANDROID_H
#include "core/os/os.h"
#include <android/native_window_jni.h>
class power_android {
class PowerAndroid {
struct LocalReferenceHolder {
JNIEnv *m_env;
@@ -65,8 +66,8 @@ private:
public:
static int s_active;
power_android();
virtual ~power_android();
PowerAndroid();
virtual ~PowerAndroid();
static bool LocalReferenceHolder_Init(struct LocalReferenceHolder *refholder, JNIEnv *env);
static struct LocalReferenceHolder LocalReferenceHolder_Setup(const char *func);
static void LocalReferenceHolder_Cleanup(struct LocalReferenceHolder *refholder);
@@ -76,4 +77,4 @@ public:
int get_power_percent_left();
};
#endif /* PLATFORM_ANDROID_POWER_ANDROID_H_ */
#endif // POWER_ANDROID_H