deleting platform specific code from ME and SMC
fixed ME viewport Signed-off-by: Guthrie Adams <guthadam@amazon.com>
This commit is contained in:
-22
@@ -6,28 +6,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzCore/std/string/string.h>
|
||||
#include <QWidget>
|
||||
#include <AzFramework/Windowing/WindowBus.h>
|
||||
|
||||
namespace Platform
|
||||
{
|
||||
void ProcessInput(void* message)
|
||||
{
|
||||
AZ_Warning("Shader Management Console", false, "ProcessInput() function is not implemented");
|
||||
}
|
||||
|
||||
AzFramework::NativeWindowHandle GetWindowHandle(WId winId)
|
||||
{
|
||||
AZ_Warning("Shader Management Console", false, "GetWindowHandle() function is not implemented");
|
||||
AZ_UNUSED(winId);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
AzFramework::WindowSize GetClientAreaSize(AzFramework::NativeWindowHandle window)
|
||||
{
|
||||
AZ_Warning("Shader Management Console", false, "GetClientAreaSize() function is not implemented");
|
||||
AZ_UNUSED(window);
|
||||
return AzFramework::WindowSize{1,1};
|
||||
}
|
||||
}
|
||||
|
||||
-45
@@ -6,51 +6,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzCore/std/string/string.h>
|
||||
#include <QWidget>
|
||||
#include <ShaderManagementConsole_Traits_Platform.h>
|
||||
|
||||
namespace Platform
|
||||
{
|
||||
void ProcessInput(void* message)
|
||||
{
|
||||
MSG* msg = (MSG*)message;
|
||||
|
||||
// Ensure that the Windows WM_INPUT messages get passed through to the AzFramework input system,
|
||||
// but only while in game mode so we don't accumulate raw input events before we start actually
|
||||
// ticking the input devices, otherwise the queued events will get sent when entering game mode.
|
||||
if (msg->message == WM_INPUT)
|
||||
{
|
||||
UINT rawInputSize;
|
||||
const UINT rawInputHeaderSize = sizeof(RAWINPUTHEADER);
|
||||
GetRawInputData((HRAWINPUT)msg->lParam, RID_INPUT, NULL, &rawInputSize, rawInputHeaderSize);
|
||||
|
||||
LPBYTE rawInputBytes = new BYTE[rawInputSize];
|
||||
GetRawInputData((HRAWINPUT)msg->lParam, RID_INPUT, rawInputBytes, &rawInputSize, rawInputHeaderSize);
|
||||
|
||||
RAWINPUT* rawInput = (RAWINPUT*)rawInputBytes;
|
||||
|
||||
AzFramework::RawInputNotificationBusWindows::Broadcast(
|
||||
&AzFramework::RawInputNotificationBusWindows::Events::OnRawInputEvent, *rawInput);
|
||||
}
|
||||
}
|
||||
|
||||
AzFramework::NativeWindowHandle GetWindowHandle(WId winId)
|
||||
{
|
||||
return reinterpret_cast<HWND>(winId);
|
||||
}
|
||||
|
||||
AzFramework::WindowSize GetClientAreaSize(AzFramework::NativeWindowHandle window)
|
||||
{
|
||||
RECT r;
|
||||
if (GetWindowRect(reinterpret_cast<HWND>(window), &r))
|
||||
{
|
||||
return AzFramework::WindowSize{aznumeric_cast<uint32_t>(r.right - r.left), aznumeric_cast<uint32_t>(r.bottom - r.top)};
|
||||
}
|
||||
else
|
||||
{
|
||||
AZ_Assert(false, "Failed to get dimensions for window");
|
||||
return AzFramework::WindowSize{};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user