+CacheTransitions::CacheTransitions(int x, int y,
+ PreferencesWindow *pwindow, PerformancePrefs *subwindow)
+ : BC_CheckBox(x, y, pwindow->thread->preferences->cache_transitions,
+ _("Cache Transitions"))
+{
+ this->pwindow = pwindow;
+}
+
+int CacheTransitions::handle_event()
+{
+ pwindow->thread->preferences->cache_transitions = get_value();
+ return 0;
+}
+
+
+PrefsUseHWDev::PrefsUseHWDev(PreferencesWindow *pwindow,
+ PerformancePrefs *subwindow, int x, int y)
+ : BC_PopupTextBox(subwindow,0,0,x,y,xS(100),yS(80),LISTBOX_TEXT)
+{
+ this->pwindow = pwindow;
+}
+
+void PrefsUseHWDev::create_objects()
+{
+ BC_PopupTextBox::create_objects();
+ set_tooltip(_("vdpau - Nvidia, Nouveau\n"
+ "vaapi - Broadcom, Intel HD graphics, Amdgpu, Radeon\n"
+ "cuda - Nvidia + Cuda SDK"));
+ hw_dev_names.append(new BC_ListBoxItem(_("none")));
+#ifdef HAVE_VAAPI
+ hw_dev_names.append(new BC_ListBoxItem("vaapi"));
+#endif
+#ifdef HAVE_VDPAU
+ hw_dev_names.append(new BC_ListBoxItem("vdpau"));
+#endif
+#ifdef HAVE_NV
+ hw_dev_names.append(new BC_ListBoxItem("cuda"));
+#endif
+ update_list(&hw_dev_names);
+ update(&pwindow->thread->preferences->use_hw_dev[0]);
+}
+
+int PrefsUseHWDev::handle_event()
+{
+ strncpy(&pwindow->thread->preferences->use_hw_dev[0],
+ get_text(), sizeof(pwindow->thread->preferences->use_hw_dev));
+ return 1;
+}