Some progress
This commit is contained in:
@@ -11,20 +11,20 @@ struct Core;
|
||||
|
||||
class SDLParallelRdpWindowInfo final : public ParallelRDP::WindowInfo {
|
||||
public:
|
||||
explicit SDLParallelRdpWindowInfo(const std::shared_ptr<SDL_Window> window) : window(window) {}
|
||||
explicit SDLParallelRdpWindowInfo(SDL_Window* window) : window(window) {}
|
||||
CoordinatePair get_window_size() override {
|
||||
int w,h;
|
||||
SDL_GetWindowSizeInPixels(window.get(), &w, &h);
|
||||
SDL_GetWindowSizeInPixels(window, &w, &h);
|
||||
return CoordinatePair{static_cast<float>(w), static_cast<float>(h)};
|
||||
}
|
||||
|
||||
private:
|
||||
std::shared_ptr<SDL_Window> window{};
|
||||
SDL_Window* window{};
|
||||
};
|
||||
|
||||
class SDLWSIPlatform final : public Vulkan::WSIPlatform {
|
||||
public:
|
||||
explicit SDLWSIPlatform(const std::shared_ptr<n64::Core> &core, InputSettings& inputSettings, SDL_Window* window) : window(window), inputSettings(inputSettings), core(core) {}
|
||||
explicit SDLWSIPlatform(const std::shared_ptr<n64::Core> &core, SDL_Window* window) : window(window), core(core) {}
|
||||
|
||||
std::vector<const char *> get_instance_extensions() override {
|
||||
auto vec = std::vector<const char *>();
|
||||
@@ -69,16 +69,14 @@ public:
|
||||
private:
|
||||
std::shared_ptr<n64::Core> core;
|
||||
SDL_Gamepad *gamepad{};
|
||||
InputSettings& inputSettings;
|
||||
bool gamepadConnected = false;
|
||||
bool canPollEvents = true;
|
||||
};
|
||||
|
||||
class RenderWidget final {
|
||||
public:
|
||||
explicit RenderWidget(const std::shared_ptr<n64::Core> &, InputSettings&, SDL_Window*);
|
||||
explicit RenderWidget(const std::shared_ptr<n64::Core> &, SDL_Window*);
|
||||
|
||||
std::shared_ptr<ParallelRDP::WindowInfo> windowInfo;
|
||||
std::shared_ptr<Vulkan::WSIPlatform> wsiPlatform;
|
||||
InputSettings& inputSettings;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user