2012-11-01 15:19:01 +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
|
2012-11-04 22:01:49 +00:00
|
|
|
// the Free Software Foundation, version 2.0 or later versions.
|
2012-11-01 15:19:01 +00:00
|
|
|
|
|
|
|
// 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/.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2013-12-29 23:23:04 +00:00
|
|
|
#include <string>
|
|
|
|
#include "Common/CommonTypes.h"
|
2012-11-01 15:19:01 +00:00
|
|
|
|
2013-03-30 22:32:34 +00:00
|
|
|
struct InputState;
|
|
|
|
|
2013-08-26 17:00:16 +00:00
|
|
|
class Host {
|
2012-11-01 15:19:01 +00:00
|
|
|
public:
|
|
|
|
virtual ~Host() {}
|
|
|
|
//virtual void StartThread()
|
|
|
|
virtual void UpdateUI() {}
|
|
|
|
|
|
|
|
virtual void UpdateMemView() {}
|
|
|
|
virtual void UpdateDisassembly() {}
|
|
|
|
|
|
|
|
virtual void SetDebugMode(bool mode) { }
|
|
|
|
|
2014-09-20 19:55:58 +00:00
|
|
|
virtual bool InitGraphics(std::string *error_string) = 0;
|
|
|
|
virtual void ShutdownGraphics() = 0;
|
2012-11-01 15:19:01 +00:00
|
|
|
|
2015-01-11 11:02:49 +00:00
|
|
|
virtual void InitSound() = 0;
|
2013-01-15 16:16:07 +00:00
|
|
|
virtual void UpdateSound() {}
|
2013-09-08 04:22:38 +00:00
|
|
|
virtual void UpdateScreen() {}
|
2013-10-13 17:24:49 +00:00
|
|
|
virtual void GoFullscreen(bool) {}
|
2012-11-01 15:19:01 +00:00
|
|
|
virtual void ShutdownSound() = 0;
|
2013-03-30 22:32:34 +00:00
|
|
|
virtual void PollControllers(InputState &input_state) {}
|
2013-10-13 18:25:59 +00:00
|
|
|
virtual void ToggleDebugConsoleVisibility() {}
|
2012-11-01 15:19:01 +00:00
|
|
|
|
|
|
|
//this is sent from EMU thread! Make sure that Host handles it properly!
|
|
|
|
virtual void BootDone() {}
|
|
|
|
|
|
|
|
virtual bool IsDebuggingEnabled() {return true;}
|
2013-12-29 23:23:04 +00:00
|
|
|
virtual bool AttemptLoadSymbolMap();
|
2013-03-31 04:42:43 +00:00
|
|
|
virtual void SaveSymbolMap() {}
|
2012-11-30 20:49:59 +00:00
|
|
|
virtual void SetWindowTitle(const char *message) {}
|
2012-12-30 04:49:45 +00:00
|
|
|
|
2013-02-10 15:36:06 +00:00
|
|
|
virtual void SendCoreWait(bool) {}
|
|
|
|
|
2013-09-22 07:18:46 +00:00
|
|
|
// While debugging is active, it's perfectly fine for these to block.
|
|
|
|
virtual bool GPUDebuggingActive() { return false; }
|
|
|
|
virtual void GPUNotifyCommand(u32 pc) {}
|
|
|
|
virtual void GPUNotifyDisplay(u32 framebuf, u32 stride, int format) {}
|
|
|
|
virtual void GPUNotifyDraw() {}
|
|
|
|
virtual void GPUNotifyTextureAttachment(u32 addr) {}
|
|
|
|
|
2013-08-26 17:00:16 +00:00
|
|
|
virtual bool CanCreateShortcut() {return false;}
|
|
|
|
virtual bool CreateDesktopShortcut(std::string argumentPath, std::string title) {return false;}
|
2013-02-10 15:36:06 +00:00
|
|
|
|
2012-12-30 04:49:45 +00:00
|
|
|
// Used for headless.
|
2013-09-18 06:12:54 +00:00
|
|
|
virtual bool ShouldSkipUI() { return false; }
|
2012-12-30 04:49:45 +00:00
|
|
|
virtual void SendDebugOutput(const std::string &output) {}
|
2013-01-14 00:35:34 +00:00
|
|
|
virtual void SendDebugScreenshot(const u8 *pixbuf, u32 w, u32 h) {}
|
2012-11-01 15:19:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern Host *host;
|