add some preliminary resolution data to video settings (will need to query monitors in the future)
This commit is contained in:
parent
f50fbfd166
commit
dd1c5b4342
@ -70,7 +70,7 @@ static bool do_mkdir(const char *path)
|
||||
|
||||
static bool MakeUserDirs()
|
||||
{
|
||||
BPtr<char*> homePath = os_get_home_path();
|
||||
BPtr<char*> homePath(os_get_home_path());
|
||||
stringstream str;
|
||||
|
||||
str << homePath << "/obs-studio";
|
||||
|
@ -62,6 +62,8 @@ int BasicGenData::AddLanguage(const char *tag)
|
||||
|
||||
void BasicGenData::FillLanguageList(const char *currentLang)
|
||||
{
|
||||
window->languageList->Clear();
|
||||
|
||||
size_t numSections = config_num_sections(localeIni);
|
||||
for (size_t i = 0; i < numSections; i++) {
|
||||
const char *lang = config_get_section(localeIni, i);
|
||||
|
@ -27,17 +27,43 @@ class BasicVideoData : public BasicSettingsData {
|
||||
|
||||
public:
|
||||
BasicVideoData(OBSBasicSettings *window);
|
||||
|
||||
void Apply();
|
||||
};
|
||||
|
||||
BasicVideoData::BasicVideoData(OBSBasicSettings *window)
|
||||
: BasicSettingsData(window)
|
||||
{
|
||||
connections.Add(window->baseResList, wxEVT_COMBOBOX,
|
||||
connections.Add(window->baseResList, wxEVT_TEXT,
|
||||
wxCommandEventHandler(
|
||||
BasicVideoData::BaseResListChanged),
|
||||
NULL, this);
|
||||
|
||||
window->baseResList->Clear();
|
||||
window->baseResList->Append("640x480");
|
||||
window->baseResList->Append("800x600");
|
||||
window->baseResList->Append("1024x768");
|
||||
window->baseResList->Append("1280x720");
|
||||
window->baseResList->Append("1920x1080");
|
||||
}
|
||||
|
||||
void BasicVideoData::BaseResListChanged(wxCommandEvent &event)
|
||||
{
|
||||
}
|
||||
|
||||
void BasicVideoData::Apply()
|
||||
{
|
||||
}
|
||||
|
||||
BasicSettingsData *CreateBasicVideoSettings(OBSBasicSettings *window)
|
||||
{
|
||||
BasicSettingsData *data = NULL;
|
||||
|
||||
try {
|
||||
data = new BasicVideoData(window);
|
||||
} catch (const char *error) {
|
||||
blog(LOG_ERROR, "CreateBasicVideoSettings failed: %s", error);
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
@ -26,6 +26,24 @@ OBSBasicSettings::OBSBasicSettings(wxWindow *parent)
|
||||
|
||||
void OBSBasicSettings::PageChanged(wxListbookEvent &event)
|
||||
{
|
||||
wxWindow *curPage = settingsList->GetCurrentPage();
|
||||
if (!curPage)
|
||||
return;
|
||||
|
||||
int id = curPage->GetId();
|
||||
|
||||
BasicSettingsData *ptr = NULL;
|
||||
|
||||
switch (id) {
|
||||
case ID_SETTINGS_GENERAL:
|
||||
ptr = CreateBasicGeneralSettings(this);
|
||||
break;
|
||||
case ID_SETTINGS_VIDEO:
|
||||
ptr = CreateBasicVideoSettings(this);
|
||||
break;
|
||||
}
|
||||
|
||||
settings = move(unique_ptr<BasicSettingsData>(ptr));
|
||||
}
|
||||
|
||||
void OBSBasicSettings::PageChanging(wxListbookEvent &event)
|
||||
|
Loading…
x
Reference in New Issue
Block a user