2013-03-10 22:08:57 +00:00
|
|
|
// Copyright (c) 2012- PPSSPP Project.
|
|
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, version 2.0 or later versions.
|
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
|
|
|
|
// Official git repository and contact information can be found at
|
|
|
|
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
|
|
|
|
2012-11-01 15:19:01 +00:00
|
|
|
#include "../Core/Host.h"
|
2012-11-12 17:32:35 +00:00
|
|
|
#include "InputDevice.h"
|
2013-07-06 17:08:59 +00:00
|
|
|
#include "KeyboardDevice.h"
|
2012-11-12 17:32:35 +00:00
|
|
|
#include <list>
|
|
|
|
#include <memory>
|
2012-11-01 15:19:01 +00:00
|
|
|
|
2013-08-12 21:26:01 +00:00
|
|
|
extern float mouseDeltaX;
|
|
|
|
extern float mouseDeltaY;
|
|
|
|
|
2014-09-20 19:55:58 +00:00
|
|
|
class WindowsHost : public Host {
|
2012-11-01 15:19:01 +00:00
|
|
|
public:
|
2014-06-29 20:13:53 +00:00
|
|
|
WindowsHost(HWND mainWindow, HWND displayWindow);
|
|
|
|
|
2014-09-20 19:55:58 +00:00
|
|
|
~WindowsHost() {
|
2013-06-26 07:32:49 +00:00
|
|
|
UpdateConsolePosition();
|
|
|
|
}
|
|
|
|
|
2014-09-20 19:55:58 +00:00
|
|
|
void UpdateMemView() override;
|
|
|
|
void UpdateDisassembly() override;
|
|
|
|
void UpdateUI() override;
|
|
|
|
void SetDebugMode(bool mode) override;
|
|
|
|
|
|
|
|
bool InitGraphics(std::string *error_message) override;
|
|
|
|
void PollControllers(InputState &input_state) override;
|
|
|
|
void ShutdownGraphics() override;
|
|
|
|
|
2015-01-11 11:02:49 +00:00
|
|
|
void InitSound() override;
|
2014-09-20 19:55:58 +00:00
|
|
|
void UpdateSound() override;
|
|
|
|
void ShutdownSound() override;
|
|
|
|
|
|
|
|
bool IsDebuggingEnabled() override;
|
|
|
|
void BootDone() override;
|
|
|
|
bool AttemptLoadSymbolMap() override;
|
|
|
|
void SaveSymbolMap() override;
|
|
|
|
void SetWindowTitle(const char *message) override;
|
|
|
|
|
|
|
|
bool GPUDebuggingActive() override;
|
|
|
|
void GPUNotifyCommand(u32 pc) override;
|
|
|
|
void GPUNotifyDisplay(u32 framebuf, u32 stride, int format) override;
|
|
|
|
void GPUNotifyDraw() override;
|
|
|
|
void GPUNotifyTextureAttachment(u32 addr) override;
|
|
|
|
void ToggleDebugConsoleVisibility() override;
|
|
|
|
|
|
|
|
bool CanCreateShortcut() override;
|
|
|
|
bool CreateDesktopShortcut(std::string argumentPath, std::string title) override;
|
|
|
|
|
|
|
|
void GoFullscreen(bool) override;
|
2013-10-13 17:24:49 +00:00
|
|
|
|
2013-07-06 17:08:59 +00:00
|
|
|
std::shared_ptr<KeyboardDevice> keyboard;
|
|
|
|
|
2012-11-01 15:19:01 +00:00
|
|
|
private:
|
2013-06-26 07:32:49 +00:00
|
|
|
void SetConsolePosition();
|
|
|
|
void UpdateConsolePosition();
|
|
|
|
|
2014-06-29 20:13:53 +00:00
|
|
|
HWND displayWindow_;
|
|
|
|
HWND mainWindow_;
|
2013-07-06 17:08:59 +00:00
|
|
|
|
2012-11-12 17:32:35 +00:00
|
|
|
std::list<std::shared_ptr<InputDevice>> input;
|
2013-08-06 23:38:54 +00:00
|
|
|
};
|