deleting platform specific code from ME and SMC

fixed ME viewport

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
This commit is contained in:
Guthrie Adams
2021-09-20 23:13:51 -05:00
parent 847e8058e0
commit 88ee878025
7 changed files with 0 additions and 199 deletions
@@ -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};
}
}
@@ -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{};
}
}
}