settings-basic-video.cpp 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /******************************************************************************
  2. Copyright (C) 2013 by Hugh Bailey <[email protected]>
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation, either version 2 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. ******************************************************************************/
  14. #include "obs-app.hpp"
  15. #include "settings-basic.hpp"
  16. #include "window-settings-basic.hpp"
  17. #include "wx-wrappers.hpp"
  18. class BasicVideoData : public BasicSettingsData {
  19. ConnectorList connections;
  20. void BaseResListChanged(wxCommandEvent &event);
  21. public:
  22. BasicVideoData(OBSBasicSettings *window);
  23. void Apply();
  24. };
  25. BasicVideoData::BasicVideoData(OBSBasicSettings *window)
  26. : BasicSettingsData(window)
  27. {
  28. connections.Add(window->baseResList, wxEVT_TEXT,
  29. wxCommandEventHandler(
  30. BasicVideoData::BaseResListChanged),
  31. NULL, this);
  32. window->baseResList->Clear();
  33. window->baseResList->Append("640x480");
  34. window->baseResList->Append("800x600");
  35. window->baseResList->Append("1024x768");
  36. window->baseResList->Append("1280x720");
  37. window->baseResList->Append("1920x1080");
  38. }
  39. void BasicVideoData::BaseResListChanged(wxCommandEvent &event)
  40. {
  41. }
  42. void BasicVideoData::Apply()
  43. {
  44. }
  45. BasicSettingsData *CreateBasicVideoSettings(OBSBasicSettings *window)
  46. {
  47. BasicSettingsData *data = NULL;
  48. try {
  49. data = new BasicVideoData(window);
  50. } catch (const char *error) {
  51. blog(LOG_ERROR, "CreateBasicVideoSettings failed: %s", error);
  52. }
  53. return data;
  54. }