You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
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:
@@ -39,7 +39,7 @@
|
||||
#include "core/os/keyboard.h"
|
||||
#include "main/main.h"
|
||||
|
||||
#include "platform/windows/key_mapping_win.h"
|
||||
#include "platform/windows/key_mapping_windows.h"
|
||||
|
||||
#include <collection.h>
|
||||
|
||||
@@ -99,7 +99,7 @@ void App::Initialize(CoreApplicationView ^ applicationView) {
|
||||
// Information about the Suspending and Resuming event handlers can be found here:
|
||||
// http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh994930.aspx
|
||||
|
||||
os = new OSUWP;
|
||||
os = new OS_UWP;
|
||||
}
|
||||
|
||||
// Called when the CoreWindow object is created (or re-created).
|
||||
@@ -398,7 +398,7 @@ void App::OnMouseMoved(MouseDevice ^ mouse_device, MouseEventArgs ^ args) {
|
||||
|
||||
void App::key_event(Windows::UI::Core::CoreWindow ^ sender, bool p_pressed, Windows::UI::Core::KeyEventArgs ^ key_args, Windows::UI::Core::CharacterReceivedEventArgs ^ char_args) {
|
||||
|
||||
OSUWP::KeyEvent ke;
|
||||
OS_UWP::KeyEvent ke;
|
||||
|
||||
ke.control = sender->GetAsyncKeyState(VirtualKey::Control) == CoreVirtualKeyStates::Down;
|
||||
ke.alt = sender->GetAsyncKeyState(VirtualKey::Menu) == CoreVirtualKeyStates::Down;
|
||||
@@ -408,14 +408,14 @@ void App::key_event(Windows::UI::Core::CoreWindow ^ sender, bool p_pressed, Wind
|
||||
|
||||
if (key_args != nullptr) {
|
||||
|
||||
ke.type = OSUWP::KeyEvent::MessageType::KEY_EVENT_MESSAGE;
|
||||
ke.type = OS_UWP::KeyEvent::MessageType::KEY_EVENT_MESSAGE;
|
||||
ke.unicode = 0;
|
||||
ke.scancode = KeyMappingWindows::get_keysym((unsigned int)key_args->VirtualKey);
|
||||
ke.echo = (!p_pressed && !key_args->KeyStatus.IsKeyReleased) || (p_pressed && key_args->KeyStatus.WasKeyDown);
|
||||
|
||||
} else {
|
||||
|
||||
ke.type = OSUWP::KeyEvent::MessageType::CHAR_EVENT_MESSAGE;
|
||||
ke.type = OS_UWP::KeyEvent::MessageType::CHAR_EVENT_MESSAGE;
|
||||
ke.unicode = char_args->KeyCode;
|
||||
ke.scancode = 0;
|
||||
ke.echo = (!p_pressed && !char_args->KeyStatus.IsKeyReleased) || (p_pressed && char_args->KeyStatus.WasKeyDown);
|
||||
|
||||
Reference in New Issue
Block a user