// Copyright (c) 2012- PPSSPP Project.12// This program is free software: you can redistribute it and/or modify3// it under the terms of the GNU General Public License as published by4// the Free Software Foundation, version 2.0 or later versions.56// This program is distributed in the hope that it will be useful,7// but WITHOUT ANY WARRANTY; without even the implied warranty of8// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the9// GNU General Public License 2.0 for more details.1011// A copy of the GPL 2.0 should have been included with the program.12// If not, see http://www.gnu.org/licenses/1314// Official git repository and contact information can be found at15// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.1617#pragma once1819#include "headless/HeadlessHost.h"20#include <thread>2122#undef HEADLESSHOST_CLASS23#define HEADLESSHOST_CLASS WindowsHeadlessHost2425#include "Common/CommonWindows.h"2627class WindowsHeadlessHost : public HeadlessHost28{29public:30bool InitGraphics(std::string *error_message, GraphicsContext **ctx, GPUCore core) override;31void ShutdownGraphics() override;3233void SwapBuffers() override;3435void SendDebugOutput(const std::string &output) override;3637protected:38enum class RenderThreadState {39IDLE,40START_REQUESTED,41STARTING,42START_FAILED,43STARTED,44STOP_REQUESTED,45STOPPING,46STOPPED,47};4849HWND hWnd;50HDC hDC;51HGLRC hRC;52volatile RenderThreadState threadState_ = RenderThreadState::IDLE;53};545556