2015-05-23 22:32:32 -06:00
|
|
|
// Copyright 2009 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
2014-02-10 11:54:46 -07:00
|
|
|
#pragma once
|
2009-07-05 20:10:26 -06:00
|
|
|
|
2014-02-17 03:18:15 -07:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
|
2009-07-05 20:10:26 -06:00
|
|
|
#ifdef _WIN32
|
|
|
|
#pragma warning(disable: 4786) //disable warning "identifier was truncated to
|
|
|
|
//'255' characters in the browser information"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2014-08-09 20:44:27 -06:00
|
|
|
std::string strDeviceName;
|
|
|
|
s32 iMajorVersion;
|
|
|
|
s32 iMinorVersion;
|
|
|
|
u32 uiSourceCount;
|
|
|
|
std::vector<std::string>* pvstrExtensions;
|
|
|
|
bool bSelected;
|
2009-07-05 20:10:26 -06:00
|
|
|
} ALDEVICEINFO, *LPALDEVICEINFO;
|
|
|
|
|
|
|
|
class ALDeviceList
|
|
|
|
{
|
|
|
|
private:
|
2014-08-09 20:44:27 -06:00
|
|
|
std::vector<ALDEVICEINFO> vDeviceInfo;
|
2009-07-05 20:10:26 -06:00
|
|
|
s32 defaultDeviceIndex;
|
|
|
|
s32 filterIndex;
|
|
|
|
|
|
|
|
public:
|
2014-11-13 19:28:27 -07:00
|
|
|
ALDeviceList();
|
|
|
|
~ALDeviceList();
|
2009-07-05 20:10:26 -06:00
|
|
|
s32 GetNumDevices();
|
2014-11-13 19:28:27 -07:00
|
|
|
char* GetDeviceName(s32 index);
|
|
|
|
void GetDeviceVersion(s32 index, s32* major, s32* minor);
|
2009-07-05 20:10:26 -06:00
|
|
|
u32 GetMaxNumSources(s32 index);
|
2014-11-13 19:28:27 -07:00
|
|
|
bool IsExtensionSupported(s32 index, char* szExtName);
|
2009-07-05 20:10:26 -06:00
|
|
|
s32 GetDefaultDevice();
|
|
|
|
void FilterDevicesMinVer(s32 major, s32 minor);
|
|
|
|
void FilterDevicesMaxVer(s32 major, s32 minor);
|
2014-11-13 19:28:27 -07:00
|
|
|
void FilterDevicesExtension(char* szExtName);
|
2009-07-05 20:10:26 -06:00
|
|
|
void ResetFilters();
|
|
|
|
s32 GetFirstFilteredDevice();
|
|
|
|
s32 GetNextFilteredDevice();
|
|
|
|
|
|
|
|
private:
|
|
|
|
u32 GetMaxNumSources();
|
|
|
|
};
|