summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/SoftwareVideoConfigDialog.h
blob: 58461d2d82f1d5b1a7d329d63b8222398e609f88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright 2010 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.

// TODO: Merge this with the original VideoConfigDiag or something
//       This is an awful way of managing a separate video backend.

#pragma once

#include <string>
#include <vector>

#include <wx/dialog.h>

#include "Core/ConfigManager.h"
#include "VideoBackends/Software/SWVideoConfig.h"
#include "VideoCommon/VideoBackendBase.h"

class SoftwareVideoConfigDialog : public wxDialog
{
public:
	SoftwareVideoConfigDialog(wxWindow* parent, const std::string &title, const std::string& ininame);
	~SoftwareVideoConfigDialog();

	void Event_Backend(wxCommandEvent &ev)
	{
		VideoBackend* new_backend = g_available_video_backends[ev.GetInt()];

		if (g_video_backend != new_backend)
		{
			Close();

			g_video_backend = new_backend;
			SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend = g_video_backend->GetName();

			g_video_backend->ShowConfig(GetParent());
		}
		ev.Skip();
	}

protected:
	SWVideoConfig& vconfig;
	std::string ininame;
};