comparison gui/win32/preferences.c @ 36833:5691f930dca6

Fix bug with Win32 GUI preferences. Fix memory leak by freeing proc_priority.
author ib
date Mon, 24 Feb 2014 14:25:53 +0000
parents edfa61ced4ad
children b2e529a2cbab
comparison
equal deleted inserted replaced
36832:17d0c4e89555 36833:5691f930dca6
30 #include "libvo/video_out.h" 30 #include "libvo/video_out.h"
31 #include "libao2/audio_out.h" 31 #include "libao2/audio_out.h"
32 #include "osdep/priority.h" 32 #include "osdep/priority.h"
33 #include "mixer.h" 33 #include "mixer.h"
34 #include "gui/util/list.h" 34 #include "gui/util/list.h"
35 #include "gui/util/string.h"
35 #include "gui/ui/ui.h" 36 #include "gui/ui/ui.h"
36 #include "gui/interface.h" 37 #include "gui/interface.h"
37 #include "gui.h" 38 #include "gui.h"
38 #include "mp_msg.h" 39 #include "mp_msg.h"
39 #include "help_mp.h" 40 #include "help_mp.h"
537 listSet(&audio_driver_list, driver); 538 listSet(&audio_driver_list, driver);
538 free(driver); 539 free(driver);
539 540
540 /* Set the priority level */ 541 /* Set the priority level */
541 SendMessage(prio, CB_GETLBTEXT, (WPARAM)SendMessage(prio, CB_GETCURSEL, 0, 0), (LPARAM)procprio); 542 SendMessage(prio, CB_GETLBTEXT, (WPARAM)SendMessage(prio, CB_GETCURSEL, 0, 0), (LPARAM)procprio);
542 proc_priority = strdup(procprio); 543 setdup(&proc_priority, procprio);
543 544
544 /* double buffering */ 545 /* double buffering */
545 if(SendDlgItemMessage(hwnd, ID_DOUBLE, BM_GETCHECK, 0, 0) == BST_CHECKED) 546 if(SendDlgItemMessage(hwnd, ID_DOUBLE, BM_GETCHECK, 0, 0) == BST_CHECKED)
546 vo_doublebuffering = TRUE; 547 vo_doublebuffering = TRUE;
547 else vo_doublebuffering = FALSE; 548 else vo_doublebuffering = FALSE;