trunk/src/osd/windows/winmain.c
| r31313 | r31314 | |
| 225 | 225 | // LOCAL VARIABLES |
| 226 | 226 | //************************************************************************** |
| 227 | 227 | |
| 228 | | //static dynamic_bind<HANDLE (WINAPI *)(LPCTSTR, LPDWORD)> av_set_mm_thread_characteristics(TEXT("avrt.dll"), "AvSetMmThreadCharacteristics" UNICODE_POSTFIX); |
| 229 | | //static dynamic_bind<HANDLE (WINAPI *)(LPCTSTR, LPCTSTR, LPDWORD)> av_set_mm_max_thread_characteristics(TEXT("avrt.dll"), "AvSetMmMaxThreadCharacteristics" UNICODE_POSTFIX); |
| 230 | | //static dynamic_bind<BOOL (WINAPI *)(HANDLE)> av_revert_mm_thread_characteristics(TEXT("avrt.dll"), "AvRevertMmThreadCharacteristics"); |
| 231 | | |
| 232 | | |
| 233 | 228 | static LPTOP_LEVEL_EXCEPTION_FILTER pass_thru_filter; |
| 234 | 229 | |
| 235 | 230 | static HANDLE watchdog_reset_event; |
| r31313 | r31314 | |
| 238 | 233 | |
| 239 | 234 | static running_machine *g_current_machine; |
| 240 | 235 | |
| 241 | | //static HANDLE mm_task = NULL; |
| 242 | | //static DWORD task_index = 0; |
| 243 | 236 | static int timeresult = !TIMERR_NOERROR; |
| 244 | | //static MMRESULT result; |
| 245 | 237 | static TIMECAPS timecaps; |
| 246 | 238 | |
| 247 | 239 | static sampling_profiler *profiler = NULL; |
| r31313 | r31314 | |
| 654 | 646 | timeBeginPeriod(timecaps.wPeriodMin); |
| 655 | 647 | } |
| 656 | 648 | |
| 657 | | // set our multimedia tasks if we can |
| 658 | | // if (av_set_mm_thread_characteristics != NULL) |
| 659 | | // mm_task = (*av_set_mm_thread_characteristics)(TEXT("Playback"), &task_index); |
| 660 | | |
| 661 | 649 | // if a watchdog thread is requested, create one |
| 662 | 650 | int watchdog = options.watchdog(); |
| 663 | 651 | if (watchdog != 0) |
| r31313 | r31314 | |
| 720 | 708 | global_free(profiler); |
| 721 | 709 | } |
| 722 | 710 | |
| 723 | | // turn off our multimedia tasks |
| 724 | | // if (av_revert_mm_thread_characteristics) |
| 725 | | // (*av_revert_mm_thread_characteristics)(mm_task); |
| 726 | | |
| 727 | 711 | // restore the timer resolution |
| 728 | 712 | if (timeresult == TIMERR_NOERROR) |
| 729 | 713 | timeEndPeriod(timecaps.wPeriodMin); |