diff options
author | 2009-02-28 22:10:06 +0000 | |
---|---|---|
committer | 2009-02-28 22:10:06 +0000 | |
commit | e2757c60d2fa5e74909eff1e7a48ce5841ad47e5 (patch) | |
tree | b30bddf750ef14f54e147b8d214d693af27f5d33 /src/osd/windows/debugwin.c | |
parent | 42004cf3baf9c0307775c43096df36c1d5884bf4 (diff) |
Modified the makefile to support experimental optional C++
compilation:
- new option CPP_COMPILE to trigger this (off by default)
- split CFLAGS into common, C-only, and C++-only flags
- when enabled, CPP_COMPILE causes 'pp' to be appended to
the target name
NOTE THAT THE SYSTEM CANNOT ACTUALLY BE COMPILED THIS WAY
YET. IT IS JUST AN EXPERIMENT.
Modified lib.mak to always build zlib/expat as C regardless
of CPP_COMPILE.
Modified windows.mak to fix warnings with MAXOPT=1, and to
leverage the new CFLAGs definitions.
Modified vconv.c to do appropriate conversions for new C++
options.
Updated sources so that libutil, libocore (Windows), and
libosd (Windows) can be cleanly compiled as C or C++. This
was mostly adding some casts against void *.
Fixed a few more general obvious problems at random
locations in the source:
- device->class is now device->devclass
- TYPES_COMPATIBLE uses typeid() when compiled for C++
- some functions with reserved names ('xor' in particular)
were renamed
- nested enums and structs were pulled out into separate
definitions (under C++ these would need to be scoped to
be referenced)
- TOKEN_VALUE cannot use .field=x initialization in C++ :(
Diffstat (limited to 'src/osd/windows/debugwin.c')
-rw-r--r-- | src/osd/windows/debugwin.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/osd/windows/debugwin.c b/src/osd/windows/debugwin.c index 21b4caf2f28..78e3c794ec0 100644 --- a/src/osd/windows/debugwin.c +++ b/src/osd/windows/debugwin.c @@ -503,7 +503,7 @@ static debugwin_info *debugwin_window_create(running_machine *machine, LPCSTR ti RECT work_bounds; // allocate memory - info = malloc_or_die(sizeof(*info)); + info = (debugwin_info *)malloc_or_die(sizeof(*info)); memset(info, 0, sizeof(*info)); // create the window @@ -584,7 +584,7 @@ static void debugwin_window_draw_contents(debugwin_info *info, HDC dc) // fill the background with light gray GetClientRect(info->wnd, &parent); - FillRect(dc, &parent, GetStockObject(LTGRAY_BRUSH)); + FillRect(dc, &parent, (HBRUSH)GetStockObject(LTGRAY_BRUSH)); // get the parent bounds in screen coords ClientToScreen(info->wnd, &((POINT *)&parent)[0]); @@ -1007,7 +1007,7 @@ static void debugwin_view_draw_contents(debugview_info *view, HDC windc) static void debugwin_view_update(debug_view *view, void *osdprivate) { - debugview_info *info = osdprivate; + debugview_info *info = (debugview_info *)osdprivate; RECT bounds, vscroll_bounds, hscroll_bounds; debug_view_xy totalsize, visiblesize, topleft; int show_vscroll, show_hscroll; @@ -1727,7 +1727,7 @@ static void memory_create_window(running_machine *machine) // create an edit box and override its key handling info->editwnd = CreateWindowEx(EDIT_BOX_STYLE_EX, TEXT("EDIT"), NULL, EDIT_BOX_STYLE, 0, 0, 100, 100, info->wnd, NULL, GetModuleHandle(NULL), NULL); - info->original_editproc = (void *)(FPTR)GetWindowLongPtr(info->editwnd, GWLP_WNDPROC); + info->original_editproc = (WNDPROC)(FPTR)GetWindowLongPtr(info->editwnd, GWLP_WNDPROC); SetWindowLongPtr(info->editwnd, GWLP_USERDATA, (LONG_PTR)info); SetWindowLongPtr(info->editwnd, GWLP_WNDPROC, (LONG_PTR)debugwin_edit_proc); SendMessage(info->editwnd, WM_SETFONT, (WPARAM)debug_font, (LPARAM)FALSE); @@ -2036,7 +2036,7 @@ static void disasm_create_window(running_machine *machine) // create an edit box and override its key handling info->editwnd = CreateWindowEx(EDIT_BOX_STYLE_EX, TEXT("EDIT"), NULL, EDIT_BOX_STYLE, 0, 0, 100, 100, info->wnd, NULL, GetModuleHandle(NULL), NULL); - info->original_editproc = (void *)(FPTR)GetWindowLongPtr(info->editwnd, GWLP_WNDPROC); + info->original_editproc = (WNDPROC)(FPTR)GetWindowLongPtr(info->editwnd, GWLP_WNDPROC); SetWindowLongPtr(info->editwnd, GWLP_USERDATA, (LONG_PTR)info); SetWindowLongPtr(info->editwnd, GWLP_WNDPROC, (LONG_PTR)debugwin_edit_proc); SendMessage(info->editwnd, WM_SETFONT, (WPARAM)debug_font, (LPARAM)FALSE); @@ -2370,7 +2370,7 @@ void console_create_window(running_machine *machine) // create an edit box and override its key handling info->editwnd = CreateWindowEx(EDIT_BOX_STYLE_EX, TEXT("EDIT"), NULL, EDIT_BOX_STYLE, 0, 0, 100, 100, info->wnd, NULL, GetModuleHandle(NULL), NULL); - info->original_editproc = (void *)(FPTR)GetWindowLongPtr(info->editwnd, GWLP_WNDPROC); + info->original_editproc = (WNDPROC)(FPTR)GetWindowLongPtr(info->editwnd, GWLP_WNDPROC); SetWindowLongPtr(info->editwnd, GWLP_USERDATA, (LONG_PTR)info); SetWindowLongPtr(info->editwnd, GWLP_WNDPROC, (LONG_PTR)debugwin_edit_proc); SendMessage(info->editwnd, WM_SETFONT, (WPARAM)debug_font, (LPARAM)FALSE); |