| 2766 | } |
| 2767 | |
| 2768 | void DoDebug(uint8 halt) |
| 2769 | { |
| 2770 | if (!debugger_open) |
| 2771 | { |
| 2772 | // init buffers |
| 2773 | // owomomo: initialize buffers even before the debugger is open, |
| 2774 | // because some of the operations about hDebug may occur before |
| 2775 | // its WM_INITDIALOG runs. |
| 2776 | debug_wstr = (wchar_t*)malloc(16384 * sizeof(wchar_t)); |
| 2777 | debug_cdl_str = (char*)malloc(512); |
| 2778 | debug_str_decoration_comment = (char*)malloc(NL_MAX_MULTILINE_COMMENT_LEN + 10); |
| 2779 | hDebug = CreateDialog(fceu_hInstance,"DEBUGGER",NULL,DebuggerCallB); |
| 2780 | if(DbgSizeX != -1 && DbgSizeY != -1) |
| 2781 | SetWindowPos(hDebug,0,0,0,DbgSizeX,DbgSizeY,SWP_NOMOVE|SWP_NOZORDER|SWP_NOOWNERZORDER); |
| 2782 | } |
| 2783 | if (hDebug) |
| 2784 | { |
| 2785 | //SetWindowPos(hDebug,HWND_TOP,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE|SWP_NOOWNERZORDER); |
| 2786 | ShowWindow(hDebug, SW_SHOWNORMAL); |
| 2787 | SetForegroundWindow(hDebug); |
| 2788 | |
| 2789 | updateGameDependentMenusDebugger(); |
| 2790 | |
| 2791 | if (GameInfo) |
| 2792 | UpdateDebugger(true); |
| 2793 | } |
| 2794 | } |
| 2795 | |
| 2796 | //----------------------------------------- |
| 2797 | DebugSystem* debugSystem; |
no test coverage detected