diff options
| author | 2015-02-25 08:09:13 +0100 | |
|---|---|---|
| committer | 2015-02-25 08:09:13 +0100 | |
| commit | 6ae44e46f91aa2bd74d9895e6bfd345baebd3d22 (patch) | |
| tree | 70be3ad6f499bb138c0335e8d2d16790f6f971b3 /src/osd | |
| parent | 33c8d18d612786130c2baafd644604137f6f4ef8 (diff) | |
Cleanups and version bumpmame0159
Diffstat (limited to 'src/osd')
55 files changed, 397 insertions, 418 deletions
diff --git a/src/osd/modules/debugger/debugwin.c b/src/osd/modules/debugger/debugwin.c index 448f35b122c..1ae50bc3c8d 100644 --- a/src/osd/modules/debugger/debugwin.c +++ b/src/osd/modules/debugger/debugwin.c @@ -73,11 +73,11 @@ protected: private: template <typename T> T *create_window(); - running_machine *m_machine; - auto_pointer<ui_metrics> m_metrics; - bool m_waiting_for_debugger; - simple_list<debugwin_info> m_window_list; - consolewin_info *m_main_console; + running_machine *m_machine; + auto_pointer<ui_metrics> m_metrics; + bool m_waiting_for_debugger; + simple_list<debugwin_info> m_window_list; + consolewin_info *m_main_console; }; @@ -207,9 +207,9 @@ bool debugger_windows::seq_pressed() const int const vkey = wininput_vkey_for_mame_code(code); bool const pressed = (vkey != 0) && ((GetAsyncKeyState(vkey) & 0x8000) != 0); - if (first) // if this is the first in the sequence, result is set equal + if (first) // if this is the first in the sequence, result is set equal result = pressed ^ invert; - else if (result) // further values are ANDed + else if (result) // further values are ANDed result = result && (pressed ^ invert); // no longer first, and clear the invert flag diff --git a/src/osd/modules/debugger/osx/debugcommandhistory.h b/src/osd/modules/debugger/osx/debugcommandhistory.h index 1e77b1f6cfb..02256690ea7 100644 --- a/src/osd/modules/debugger/osx/debugcommandhistory.h +++ b/src/osd/modules/debugger/osx/debugcommandhistory.h @@ -16,9 +16,9 @@ @interface MAMEDebugCommandHistory : NSObject { - NSInteger length, position; - NSString *current; - NSMutableArray *history; + NSInteger length, position; + NSString *current; + NSMutableArray *history; } + (NSInteger)defaultLength; diff --git a/src/osd/modules/debugger/osx/debugconsole.h b/src/osd/modules/debugger/osx/debugconsole.h index 4cae426ce9e..87554b4dd6a 100644 --- a/src/osd/modules/debugger/osx/debugconsole.h +++ b/src/osd/modules/debugger/osx/debugconsole.h @@ -22,13 +22,13 @@ @interface MAMEDebugConsole : MAMEDebugWindowHandler <NSTextFieldDelegate, NSSplitViewDelegate> { - MAMEDebugCommandHistory *history; - NSMutableArray *auxiliaryWindows; + MAMEDebugCommandHistory *history; + NSMutableArray *auxiliaryWindows; - MAMERegistersView *regView; - MAMEDisassemblyView *dasmView; - MAMEDebugView *consoleView; - NSTextField *commandField; + MAMERegistersView *regView; + MAMEDisassemblyView *dasmView; + MAMEDebugView *consoleView; + NSTextField *commandField; } - (id)initWithMachine:(running_machine &)m; diff --git a/src/osd/modules/debugger/osx/debugview.h b/src/osd/modules/debugger/osx/debugview.h index b76e4633f38..d45d6a6e045 100644 --- a/src/osd/modules/debugger/osx/debugview.h +++ b/src/osd/modules/debugger/osx/debugview.h @@ -19,19 +19,19 @@ @interface MAMEDebugView : NSView { - int type; - running_machine *machine; - debug_view *view; - BOOL wholeLineScroll; + int type; + running_machine *machine; + debug_view *view; + BOOL wholeLineScroll; - INT32 totalWidth, totalHeight, originTop; + INT32 totalWidth, totalHeight, originTop; - NSFont *font; - CGFloat fontWidth, fontHeight, fontAscent; + NSFont *font; + CGFloat fontWidth, fontHeight, fontAscent; - NSTextStorage *text; - NSTextContainer *textContainer; - NSLayoutManager *layoutManager; + NSTextStorage *text; + NSTextContainer *textContainer; + NSLayoutManager *layoutManager; } + (NSFont *)defaultFont; diff --git a/src/osd/modules/debugger/osx/debugwindowhandler.h b/src/osd/modules/debugger/osx/debugwindowhandler.h index 2764dc4046c..f720da4f6ef 100644 --- a/src/osd/modules/debugger/osx/debugwindowhandler.h +++ b/src/osd/modules/debugger/osx/debugwindowhandler.h @@ -28,8 +28,8 @@ extern NSString *const MAMEAuxiliaryDebugWindowWillCloseNotification; @interface MAMEDebugWindowHandler : NSObject <NSWindowDelegate> { - NSWindow *window; - running_machine *machine; + NSWindow *window; + running_machine *machine; } + (void)addCommonActionItems:(NSMenu *)menu; @@ -64,7 +64,7 @@ extern NSString *const MAMEAuxiliaryDebugWindowWillCloseNotification; @interface MAMEAuxiliaryDebugWindowHandler : MAMEDebugWindowHandler { - MAMEDebugConsole *console; + MAMEDebugConsole *console; } + (void)cascadeWindow:(NSWindow *)window; @@ -86,8 +86,8 @@ extern NSString *const MAMEAuxiliaryDebugWindowWillCloseNotification; @interface MAMEExpressionAuxiliaryDebugWindowHandler : MAMEAuxiliaryDebugWindowHandler <NSTextFieldDelegate> { - MAMEDebugCommandHistory *history; - NSTextField *expressionField; + MAMEDebugCommandHistory *history; + NSTextField *expressionField; } - (id)initWithMachine:(running_machine &)m title:(NSString *)t console:(MAMEDebugConsole *)c; diff --git a/src/osd/modules/debugger/osx/deviceinfoviewer.h b/src/osd/modules/debugger/osx/deviceinfoviewer.h index 41243a954de..7b9975d0e73 100644 --- a/src/osd/modules/debugger/osx/deviceinfoviewer.h +++ b/src/osd/modules/debugger/osx/deviceinfoviewer.h @@ -22,7 +22,7 @@ @interface MAMEDeviceInfoViewer : MAMEAuxiliaryDebugWindowHandler { - device_t *device; + device_t *device; } - (id)initWithDevice:(device_t &)d machine:(running_machine &)m console:(MAMEDebugConsole *)c; diff --git a/src/osd/modules/debugger/osx/devicesviewer.h b/src/osd/modules/debugger/osx/devicesviewer.h index 24a2a2dc415..11408b43b01 100644 --- a/src/osd/modules/debugger/osx/devicesviewer.h +++ b/src/osd/modules/debugger/osx/devicesviewer.h @@ -22,8 +22,8 @@ @interface MAMEDevicesViewer : MAMEAuxiliaryDebugWindowHandler <NSOutlineViewDataSource> { - MAMEDeviceWrapper *root; - NSOutlineView *devicesView; + MAMEDeviceWrapper *root; + NSOutlineView *devicesView; } - (id)initWithMachine:(running_machine &)m console:(MAMEDebugConsole *)c; diff --git a/src/osd/modules/debugger/osx/disassemblyviewer.h b/src/osd/modules/debugger/osx/disassemblyviewer.h index 732975c5ddd..d9899457abb 100644 --- a/src/osd/modules/debugger/osx/disassemblyviewer.h +++ b/src/osd/modules/debugger/osx/disassemblyviewer.h @@ -22,8 +22,8 @@ @interface MAMEDisassemblyViewer : MAMEExpressionAuxiliaryDebugWindowHandler { - MAMEDisassemblyView *dasmView; - NSPopUpButton *subviewButton; + MAMEDisassemblyView *dasmView; + NSPopUpButton *subviewButton; } - (id)initWithMachine:(running_machine &)m console:(MAMEDebugConsole *)c; diff --git a/src/osd/modules/debugger/osx/errorlogviewer.h b/src/osd/modules/debugger/osx/errorlogviewer.h index 22538f81307..610c4f609ae 100644 --- a/src/osd/modules/debugger/osx/errorlogviewer.h +++ b/src/osd/modules/debugger/osx/errorlogviewer.h @@ -22,7 +22,7 @@ @interface MAMEErrorLogViewer : MAMEAuxiliaryDebugWindowHandler { - MAMEErrorLogView *logView; + MAMEErrorLogView *logView; } - (id)initWithMachine:(running_machine &)m console:(MAMEDebugConsole *)c; diff --git a/src/osd/modules/debugger/osx/memoryviewer.h b/src/osd/modules/debugger/osx/memoryviewer.h index 63c9d4eea2b..03fc65571cd 100644 --- a/src/osd/modules/debugger/osx/memoryviewer.h +++ b/src/osd/modules/debugger/osx/memoryviewer.h @@ -22,8 +22,8 @@ @interface MAMEMemoryViewer : MAMEExpressionAuxiliaryDebugWindowHandler { - MAMEMemoryView *memoryView; - NSPopUpButton *subviewButton; + MAMEMemoryView *memoryView; + NSPopUpButton *subviewButton; } - (id)initWithMachine:(running_machine &)m console:(MAMEDebugConsole *)c; diff --git a/src/osd/modules/debugger/osx/pointsviewer.h b/src/osd/modules/debugger/osx/pointsviewer.h index 3943f6b486f..ad9ef0f62fd 100644 --- a/src/osd/modules/debugger/osx/pointsviewer.h +++ b/src/osd/modules/debugger/osx/pointsviewer.h @@ -22,7 +22,7 @@ @interface MAMEPointsViewer : MAMEAuxiliaryDebugWindowHandler { - NSTabView *tabs; + NSTabView *tabs; } - (id)initWithMachine:(running_machine &)m console:(MAMEDebugConsole *)c; diff --git a/src/osd/modules/debugger/win/consolewininfo.c b/src/osd/modules/debugger/win/consolewininfo.c index 771f2d604ce..e24271a6f50 100644 --- a/src/osd/modules/debugger/win/consolewininfo.c +++ b/src/osd/modules/debugger/win/consolewininfo.c @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// consolewininfo.c - Win32 debug window handling +// consolewininfo.c - Win32 debug window handling // //============================================================ @@ -304,9 +304,9 @@ bool consolewin_info::handle_command(WPARAM wparam, LPARAM lparam) void consolewin_info::process_string(char const *string) { - if (string[0] == 0) // an empty string is a single step + if (string[0] == 0) // an empty string is a single step debug_cpu_get_visible_cpu(machine())->debug()->single_step(); - else // otherwise, just process the command + else // otherwise, just process the command debug_console_execute_command(machine(), string, 1); // clear the edit text box diff --git a/src/osd/modules/debugger/win/consolewininfo.h b/src/osd/modules/debugger/win/consolewininfo.h index 08790fb66b3..b74a189657d 100644 --- a/src/osd/modules/debugger/win/consolewininfo.h +++ b/src/osd/modules/debugger/win/consolewininfo.h @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// consolewininfo.h - Win32 debug window handling +// consolewininfo.h - Win32 debug window handling // //============================================================ @@ -47,7 +47,7 @@ private: static void add_filter_entry(astring &dest, char const *description, char const *extensions); static void copy_extension_list(astring &dest, char const *extensions); - HMENU m_devices_menu; + HMENU m_devices_menu; }; #endif diff --git a/src/osd/modules/debugger/win/debugbaseinfo.c b/src/osd/modules/debugger/win/debugbaseinfo.c index 34451875063..66824b9f029 100644 --- a/src/osd/modules/debugger/win/debugbaseinfo.c +++ b/src/osd/modules/debugger/win/debugbaseinfo.c @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// debugbaseinfo.c - Win32 debug window handling +// debugbaseinfo.c - Win32 debug window handling // //============================================================ diff --git a/src/osd/modules/debugger/win/debugbaseinfo.h b/src/osd/modules/debugger/win/debugbaseinfo.h index 9aee28b49ef..749e432a6bc 100644 --- a/src/osd/modules/debugger/win/debugbaseinfo.h +++ b/src/osd/modules/debugger/win/debugbaseinfo.h @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// debugbaseinfo.h - Win32 debug window handling +// debugbaseinfo.h - Win32 debug window handling // //============================================================ @@ -30,10 +30,10 @@ protected: static void smart_show_window(HWND wnd, bool show); private: - debugger_windows_interface &m_debugger; - running_machine &m_machine; - ui_metrics const &m_metrics; - bool const &m_waiting_for_debugger; + debugger_windows_interface &m_debugger; + running_machine &m_machine; + ui_metrics const &m_metrics; + bool const &m_waiting_for_debugger; }; diff --git a/src/osd/modules/debugger/win/debugviewinfo.c b/src/osd/modules/debugger/win/debugviewinfo.c index 883a12dac11..f3c12a09f2e 100644 --- a/src/osd/modules/debugger/win/debugviewinfo.c +++ b/src/osd/modules/debugger/win/debugviewinfo.c @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// debugview.c - Win32 debug window handling +// debugview.c - Win32 debug window handling // //============================================================ @@ -17,20 +17,20 @@ // debugger view styles -#define DEBUG_VIEW_STYLE WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN -#define DEBUG_VIEW_STYLE_EX 0 +#define DEBUG_VIEW_STYLE WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN +#define DEBUG_VIEW_STYLE_EX 0 // combo box styles -#define COMBO_BOX_STYLE WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_VSCROLL -#define COMBO_BOX_STYLE_EX 0 +#define COMBO_BOX_STYLE WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_VSCROLL +#define COMBO_BOX_STYLE_EX 0 // horizontal scroll bar styles -#define HSCROLL_STYLE WS_CHILD | WS_VISIBLE | SBS_HORZ -#define HSCROLL_STYLE_EX 0 +#define HSCROLL_STYLE WS_CHILD | WS_VISIBLE | SBS_HORZ +#define HSCROLL_STYLE_EX 0 // vertical scroll bar styles -#define VSCROLL_STYLE WS_CHILD | WS_VISIBLE | SBS_VERT -#define VSCROLL_STYLE_EX 0 +#define VSCROLL_STYLE WS_CHILD | WS_VISIBLE | SBS_VERT +#define VSCROLL_STYLE_EX 0 bool debugview_info::s_window_class_registered = false; @@ -310,7 +310,6 @@ void debugview_info::draw_contents(HDC windc) // iterate over rows and columns for (UINT32 row = 0; row < visarea.y; row++) { - // loop twice; once to fill the background and once to draw the text for (int iter = 0; iter < 2; iter++) { @@ -789,16 +788,16 @@ void debugview_info::register_window_class() WNDCLASS wc = { 0 }; // initialize the description of the window class - wc.lpszClassName = TEXT("MAMEDebugView"); - wc.hInstance = GetModuleHandle(NULL); - wc.lpfnWndProc = &debugview_info::static_view_proc; - wc.hCursor = LoadCursor(NULL, IDC_ARROW); - wc.hIcon = LoadIcon(wc.hInstance, MAKEINTRESOURCE(2)); - wc.lpszMenuName = NULL; - wc.hbrBackground = NULL; - wc.style = 0; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; + wc.lpszClassName = TEXT("MAMEDebugView"); + wc.hInstance = GetModuleHandle(NULL); + wc.lpfnWndProc = &debugview_info::static_view_proc; + wc.hCursor = LoadCursor(NULL, IDC_ARROW); + wc.hIcon = LoadIcon(wc.hInstance, MAKEINTRESOURCE(2)); + wc.lpszMenuName = NULL; + wc.hbrBackground = NULL; + wc.style = 0; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; // register the class; fail if we can't if (!RegisterClass(&wc)) diff --git a/src/osd/modules/debugger/win/debugviewinfo.h b/src/osd/modules/debugger/win/debugviewinfo.h index d804554778a..ec4eedf2e69 100644 --- a/src/osd/modules/debugger/win/debugviewinfo.h +++ b/src/osd/modules/debugger/win/debugviewinfo.h @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// debugviewinfo.h - Win32 debug window handling +// debugviewinfo.h - Win32 debug window handling // //============================================================ @@ -65,13 +65,13 @@ private: static void register_window_class(); - debugwin_info &m_owner; - debug_view *m_view; - HWND m_wnd; - HWND m_hscroll; - HWND m_vscroll; + debugwin_info &m_owner; + debug_view *m_view; + HWND m_wnd; + HWND m_hscroll; + HWND m_vscroll; - static bool s_window_class_registered; + static bool s_window_class_registered; }; #endif diff --git a/src/osd/modules/debugger/win/debugwin.h b/src/osd/modules/debugger/win/debugwin.h index 6971e7f93c0..bedf2b36d43 100644 --- a/src/osd/modules/debugger/win/debugwin.h +++ b/src/osd/modules/debugger/win/debugwin.h @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// debugwin.h - Win32 debug window handling +// debugwin.h - Win32 debug window handling // //============================================================ diff --git a/src/osd/modules/debugger/win/debugwininfo.c b/src/osd/modules/debugger/win/debugwininfo.c index f900715a015..1a3258c1cab 100644 --- a/src/osd/modules/debugger/win/debugwininfo.c +++ b/src/osd/modules/debugger/win/debugwininfo.c @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// debugwininfo.c - Win32 debug window handling +// debugwininfo.c - Win32 debug window handling // //============================================================ @@ -579,16 +579,16 @@ void debugwin_info::register_window_class() WNDCLASS wc = { 0 }; // initialize the description of the window class - wc.lpszClassName = TEXT("MAMEDebugWindow"); - wc.hInstance = GetModuleHandle(NULL); - wc.lpfnWndProc = &debugwin_info::static_window_proc; - wc.hCursor = LoadCursor(NULL, IDC_ARROW); - wc.hIcon = LoadIcon(wc.hInstance, MAKEINTRESOURCE(2)); - wc.lpszMenuName = NULL; - wc.hbrBackground = NULL; - wc.style = 0; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; + wc.lpszClassName = TEXT("MAMEDebugWindow"); + wc.hInstance = GetModuleHandle(NULL); + wc.lpfnWndProc = &debugwin_info::static_window_proc; + wc.hCursor = LoadCursor(NULL, IDC_ARROW); + wc.hIcon = LoadIcon(wc.hInstance, MAKEINTRESOURCE(2)); + wc.lpszMenuName = NULL; + wc.hbrBackground = NULL; + wc.style = 0; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; // register the class; fail if we can't if (!RegisterClass(&wc)) diff --git a/src/osd/modules/debugger/win/debugwininfo.h b/src/osd/modules/debugger/win/debugwininfo.h index 9ae4ad34aca..51acc70018f 100644 --- a/src/osd/modules/debugger/win/debugwininfo.h +++ b/src/osd/modules/debugger/win/debugwininfo.h @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// debugwininfo.h - Win32 debug window handling +// debugwininfo.h - Win32 debug window handling // //============================================================ @@ -54,11 +54,11 @@ public: virtual bool handle_key(WPARAM wparam, LPARAM lparam); protected: - static DWORD const DEBUG_WINDOW_STYLE = (WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN) & (~WS_MINIMIZEBOX & ~WS_MAXIMIZEBOX); - static DWORD const DEBUG_WINDOW_STYLE_EX = 0; + static DWORD const DEBUG_WINDOW_STYLE = (WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN) & (~WS_MINIMIZEBOX & ~WS_MAXIMIZEBOX); + static DWORD const DEBUG_WINDOW_STYLE_EX = 0; - static int const MAX_VIEWS = 4; - static int const EDGE_WIDTH = 3; + static int const MAX_VIEWS = 4; + static int const EDGE_WIDTH = 3; enum { @@ -98,7 +98,7 @@ protected: ID_SHOW_BREAKPOINTS, ID_SHOW_WATCHPOINTS, - ID_DEVICE_OPTIONS // always keep this at the end + ID_DEVICE_OPTIONS // always keep this at the end }; bool is_main_console() const { return m_is_main_console; } @@ -115,7 +115,7 @@ protected: void draw_border(HDC dc, RECT &bounds); void draw_border(HDC dc, HWND child); - auto_pointer<debugview_info> m_views[MAX_VIEWS]; + auto_pointer<debugview_info> m_views[MAX_VIEWS]; private: LRESULT window_proc(UINT message, WPARAM wparam, LPARAM lparam); @@ -126,18 +126,18 @@ private: static void register_window_class(); - bool const m_is_main_console; + bool const m_is_main_console; - debugwin_info *m_next; - HWND m_wnd; - WNDPROC const m_handler; + debugwin_info *m_next; + HWND m_wnd; + WNDPROC const m_handler; - UINT32 m_minwidth, m_maxwidth; - UINT32 m_minheight, m_maxheight; + UINT32 m_minwidth, m_maxwidth; + UINT32 m_minheight, m_maxheight; - UINT16 m_ignore_char_lparam; + UINT16 m_ignore_char_lparam; - static bool s_window_class_registered; + static bool s_window_class_registered; }; #endif diff --git a/src/osd/modules/debugger/win/disasmbasewininfo.c b/src/osd/modules/debugger/win/disasmbasewininfo.c index 886ccc56f24..c1b9ef5759e 100644 --- a/src/osd/modules/debugger/win/disasmbasewininfo.c +++ b/src/osd/modules/debugger/win/disasmbasewininfo.c @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// disasmbasewininfo.c - Win32 debug window handling +// disasmbasewininfo.c - Win32 debug window handling // //============================================================ diff --git a/src/osd/modules/debugger/win/disasmbasewininfo.h b/src/osd/modules/debugger/win/disasmbasewininfo.h index a74b5196b44..085ec351c98 100644 --- a/src/osd/modules/debugger/win/disasmbasewininfo.h +++ b/src/osd/modules/debugger/win/disasmbasewininfo.h @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// disasmbasewininfo.h - Win32 debug window handling +// disasmbasewininfo.h - Win32 debug window handling // //============================================================ diff --git a/src/osd/modules/debugger/win/disasmviewinfo.c b/src/osd/modules/debugger/win/disasmviewinfo.c index 98ff1188188..28069c9c89f 100644 --- a/src/osd/modules/debugger/win/disasmviewinfo.c +++ b/src/osd/modules/debugger/win/disasmviewinfo.c @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// disasmviewinfo.c - Win32 debug window handling +// disasmviewinfo.c - Win32 debug window handling // //============================================================ @@ -41,4 +41,4 @@ void disasmview_info::set_expression(char const *string) void disasmview_info::set_right_column(disasm_right_column contents) { view<debug_view_disasm>()->set_right_column(contents); -}
\ No newline at end of file +} diff --git a/src/osd/modules/debugger/win/disasmviewinfo.h b/src/osd/modules/debugger/win/disasmviewinfo.h index bfd8e73cd95..011748517c0 100644 --- a/src/osd/modules/debugger/win/disasmviewinfo.h +++ b/src/osd/modules/debugger/win/disasmviewinfo.h @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// disasmviewinfo.h - Win32 debug window handling +// disasmviewinfo.h - Win32 debug window handling // //============================================================ diff --git a/src/osd/modules/debugger/win/disasmwininfo.c b/src/osd/modules/debugger/win/disasmwininfo.c index 9f2db09919c..9c6c02e23eb 100644 --- a/src/osd/modules/debugger/win/disasmwininfo.c +++ b/src/osd/modules/debugger/win/disasmwininfo.c @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// disasmwininfo.c - Win32 debug window handling +// disasmwininfo.c - Win32 debug window handling // //============================================================ diff --git a/src/osd/modules/debugger/win/disasmwininfo.h b/src/osd/modules/debugger/win/disasmwininfo.h index 7817aa9f456..e55b74ba3c1 100644 --- a/src/osd/modules/debugger/win/disasmwininfo.h +++ b/src/osd/modules/debugger/win/disasmwininfo.h @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// disasmwininfo.h - Win32 debug window handling +// disasmwininfo.h - Win32 debug window handling // //============================================================ @@ -30,7 +30,7 @@ private: void update_caption(); - HWND m_combownd; + HWND m_combownd; }; #endif diff --git a/src/osd/modules/debugger/win/editwininfo.c b/src/osd/modules/debugger/win/editwininfo.c index f9dfdb053e1..f89c766ebd4 100644 --- a/src/osd/modules/debugger/win/editwininfo.c +++ b/src/osd/modules/debugger/win/editwininfo.c @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// editwininfo.c - Win32 debug window handling +// editwininfo.c - Win32 debug window handling // //============================================================ @@ -15,8 +15,8 @@ // edit box styles -#define EDIT_BOX_STYLE WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL -#define EDIT_BOX_STYLE_EX 0 +#define EDIT_BOX_STYLE WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL +#define EDIT_BOX_STYLE_EX 0 editwin_info::editwin_info(debugger_windows_interface &debugger, bool is_main_console, LPCSTR title, WNDPROC handler) : diff --git a/src/osd/modules/debugger/win/editwininfo.h b/src/osd/modules/debugger/win/editwininfo.h index b89a710781a..ff5e20f03ec 100644 --- a/src/osd/modules/debugger/win/editwininfo.h +++ b/src/osd/modules/debugger/win/editwininfo.h @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// editwininfo.h - Win32 debug window handling +// editwininfo.h - Win32 debug window handling // //============================================================ @@ -25,8 +25,8 @@ public: virtual bool set_default_focus(); protected: - static DWORD const COMBO_BOX_STYLE = WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_VSCROLL; - static DWORD const COMBO_BOX_STYLE_EX = 0; + static DWORD const COMBO_BOX_STYLE = WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_VSCROLL; + static DWORD const COMBO_BOX_STYLE_EX = 0; void set_editwnd_bounds(RECT const &bounds); void set_editwnd_text(char const *text); @@ -42,15 +42,15 @@ private: static LRESULT CALLBACK static_edit_proc(HWND wnd, UINT message, WPARAM wparam, LPARAM lparam); - static int const MAX_EDIT_STRING = 256; - static int const HISTORY_LENGTH = 20; + static int const MAX_EDIT_STRING = 256; + static int const HISTORY_LENGTH = 20; - HWND m_editwnd; - astring m_edit_defstr; - WNDPROC m_original_editproc; - TCHAR m_history[HISTORY_LENGTH][MAX_EDIT_STRING]; - int m_history_count; - int m_last_history; + HWND m_editwnd; + astring m_edit_defstr; + WNDPROC m_original_editproc; + TCHAR m_history[HISTORY_LENGTH][MAX_EDIT_STRING]; + int m_history_count; + int m_last_history; }; #endif diff --git a/src/osd/modules/debugger/win/logwininfo.c b/src/osd/modules/debugger/win/logwininfo.c index 2f2b06c349d..32e31bd48c8 100644 --- a/src/osd/modules/debugger/win/logwininfo.c +++ b/src/osd/modules/debugger/win/logwininfo.c @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// logwininfo.c - Win32 debug window handling +// logwininfo.c - Win32 debug window handling // //============================================================ diff --git a/src/osd/modules/debugger/win/logwininfo.h b/src/osd/modules/debugger/win/logwininfo.h index f26a557b2cb..45c41447491 100644 --- a/src/osd/modules/debugger/win/logwininfo.h +++ b/src/osd/modules/debugger/win/logwininfo.h @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// logwininfo.h - Win32 debug window handling +// logwininfo.h - Win32 debug window handling // //============================================================ diff --git a/src/osd/modules/debugger/win/memoryviewinfo.c b/src/osd/modules/debugger/win/memoryviewinfo.c index 4c5bdc44c7e..644b429e0d9 100644 --- a/src/osd/modules/debugger/win/memoryviewinfo.c +++ b/src/osd/modules/debugger/win/memoryviewinfo.c @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// memoryviewinfo.c - Win32 debug window handling +// memoryviewinfo.c - Win32 debug window handling // //============================================================ diff --git a/src/osd/modules/debugger/win/memoryviewinfo.h b/src/osd/modules/debugger/win/memoryviewinfo.h index 1951473d68b..8089d050a4e 100644 --- a/src/osd/modules/debugger/win/memoryviewinfo.h +++ b/src/osd/modules/debugger/win/memoryviewinfo.h @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// memoryviewinfo.h - Win32 debug window handling +// memoryviewinfo.h - Win32 debug window handling // //============================================================ diff --git a/src/osd/modules/debugger/win/memorywininfo.c b/src/osd/modules/debugger/win/memorywininfo.c index 19a4b121de9..8de8749de7b 100644 --- a/src/osd/modules/debugger/win/memorywininfo.c +++ b/src/osd/modules/debugger/win/memorywininfo.c @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// memorywininfo.c - Win32 debug window handling +// memorywininfo.c - Win32 debug window handling // //============================================================ diff --git a/src/osd/modules/debugger/win/memorywininfo.h b/src/osd/modules/debugger/win/memorywininfo.h index a6e71f8fdcd..a52315829b8 100644 --- a/src/osd/modules/debugger/win/memorywininfo.h +++ b/src/osd/modules/debugger/win/memorywininfo.h @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// memorywininfo.h - Win32 debug window handling +// memorywininfo.h - Win32 debug window handling // //============================================================ @@ -33,7 +33,7 @@ private: void update_caption(); - HWND m_combownd; + HWND m_combownd; }; #endif diff --git a/src/osd/modules/debugger/win/pointswininfo.c b/src/osd/modules/debugger/win/pointswininfo.c index a958a285046..87c981ef557 100644 --- a/src/osd/modules/debugger/win/pointswininfo.c +++ b/src/osd/modules/debugger/win/pointswininfo.c @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// pointswininfo.c - Win32 debug window handling +// pointswininfo.c - Win32 debug window handling // //============================================================ diff --git a/src/osd/modules/debugger/win/pointswininfo.h b/src/osd/modules/debugger/win/pointswininfo.h index e04a467bb0a..a6c944bc160 100644 --- a/src/osd/modules/debugger/win/pointswininfo.h +++ b/src/osd/modules/debugger/win/pointswininfo.h @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// pointswininfo.h - Win32 debug window handling +// pointswininfo.h - Win32 debug window handling // //============================================================ diff --git a/src/osd/modules/debugger/win/uimetrics.c b/src/osd/modules/debugger/win/uimetrics.c index f61b90275da..7532518f489 100644 --- a/src/osd/modules/debugger/win/uimetrics.c +++ b/src/osd/modules/debugger/win/uimetrics.c @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// uimetrics.c - Win32 debug window handling +// uimetrics.c - Win32 debug window handling // //============================================================ diff --git a/src/osd/modules/debugger/win/uimetrics.h b/src/osd/modules/debugger/win/uimetrics.h index 54db03c1be4..d8f46c8cc68 100644 --- a/src/osd/modules/debugger/win/uimetrics.h +++ b/src/osd/modules/debugger/win/uimetrics.h @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles, Vas Crabb //============================================================ // -// uimetrics.h - Win32 debug window handling +// uimetrics.h - Win32 debug window handling // //============================================================ diff --git a/src/osd/modules/netdev/pcap.c b/src/osd/modules/netdev/pcap.c index 7c475c62ee3..756a51f39b8 100644 --- a/src/osd/modules/netdev/pcap.c +++ b/src/osd/modules/netdev/pcap.c @@ -15,8 +15,8 @@ #if defined(SDLMAME_WIN32) || defined(OSD_WINDOWS) -#define LIB_NAME L"wpcap.dll" -#define LIB_ERROR_STR "Unable to load winpcap: %lx\n" +#define LIB_NAME L"wpcap.dll" +#define LIB_ERROR_STR "Unable to load winpcap: %lx\n" typedef DWORD except_type; #else @@ -28,11 +28,11 @@ typedef DWORD except_type; #endif #ifdef SDLMAME_MACOSX -#define LIB_NAME "libpcap.dylib" +#define LIB_NAME "libpcap.dylib" #else -#define LIB_NAME "libpcap.so" +#define LIB_NAME "libpcap.so" #endif -#define LIB_ERROR_STR "Unable to load pcap: %s\n" +#define LIB_ERROR_STR "Unable to load pcap: %s\n" typedef void *HMODULE; typedef const char *except_type; @@ -178,7 +178,7 @@ void netdev_pcap::set_mac(const char *mac) sprintf(filter, "not ether src %.2X:%.2X:%.2X:%.2X:%.2X:%.2X and (ether dst %.2X:%.2X:%.2X:%.2X:%.2X:%.2X or ether multicast or ether broadcast or ether dst 09:00:07:ff:ff:ff)", (unsigned char)mac[0], (unsigned char)mac[1], (unsigned char)mac[2],(unsigned char)mac[3], (unsigned char)mac[4], (unsigned char)mac[5], (unsigned char)mac[0], (unsigned char)mac[1], (unsigned char)mac[2],(unsigned char)mac[3], (unsigned char)mac[4], (unsigned char)mac[5]); #else sprintf(filter, "ether dst %.2X:%.2X:%.2X:%.2X:%.2X:%.2X or ether multicast or ether broadcast", (unsigned char)mac[0], (unsigned char)mac[1], (unsigned char)mac[2],(unsigned char)mac[3], (unsigned char)mac[4], (unsigned char)mac[5]); -#endif +#endif if(pcap_compile_dl(m_p, &fp, filter, 1, 0) == -1) { logerror("Error with pcap_compile\n"); } @@ -300,4 +300,3 @@ void pcap_module::exit() MODULE_DEFINITION(NETDEV_PCAP, pcap_module) - diff --git a/src/osd/sdl/blit13.h b/src/osd/sdl/blit13.h index ad935941036..3fd229e93da 100644 --- a/src/osd/sdl/blit13.h +++ b/src/osd/sdl/blit13.h @@ -35,7 +35,6 @@ inline UINT32 ycc_to_rgb(const UINT8 y, const UINT8 cb, const UINT8 cr) inline UINT32 pixel_ycc_to_rgb(const UINT16 *pixel) { - const UINT32 p = *(UINT32 *)((FPTR) pixel & ~3); return ycc_to_rgb((*pixel >> 8) & 0xff, (p) & 0xff, (p>>16) & 0xff); } @@ -53,17 +52,17 @@ inline UINT32 pixel_ycc_to_rgb_pal(const UINT16 *pixel, const rgb_t *palette) #define FUNC_DEF(source) op(const source &src, const rgb_t *palbase) const #define FUNCTOR(name, x...) \ - template<typename _source, typename _dest> \ - struct name { _dest FUNC_DEF(_source) { x } }; + template<typename _source, typename _dest> \ + struct name { _dest FUNC_DEF(_source) { x } }; FUNCTOR(op_argb32_argb32, return src; ) FUNCTOR(op_rgb32_argb32, return src | 0xff000000; ) FUNCTOR(op_pal16_argb32, return 0xff000000 |palbase[src]; ) FUNCTOR(op_pal16_rgb32, return palbase[src]; ) FUNCTOR(op_rgb32pal_argb32, - return palbase[0x200 + (((src) >> 16) & 0xff) ] | - palbase[0x100 + (((src) >> 8) & 0xff) ] | - palbase[((src) & 0xff) ] | 0xff000000; ) + return palbase[0x200 + (((src) >> 16) & 0xff) ] | + palbase[0x100 + (((src) >> 8) & 0xff) ] | + palbase[((src) & 0xff) ] | 0xff000000; ) FUNCTOR(op_pal16a_argb32, return palbase[src]; ) @@ -74,21 +73,21 @@ FUNCTOR(op_rgb15_argb32, FUNCTOR(op_rgb15pal_argb32, return 0xff000000 | palbase[0x40 + ((src >> 10) & 0x1f)] | - palbase[0x20 + ((src >> 5) & 0x1f)] | palbase[0x00 + ((src >> 0) & 0x1f)]; ) + palbase[0x20 + ((src >> 5) & 0x1f)] | palbase[0x00 + ((src >> 0) & 0x1f)]; ) FUNCTOR(op_argb32_rgb32, return premult32(src); ) FUNCTOR(op_pal16a_rgb32, return premult32(palbase[src]); ) FUNCTOR(op_pal16_argb1555, return (palbase[src]&0xf80000) >> 9 | - (palbase[src]&0x00f800) >> 6 | - (palbase[src]&0x0000f8) >> 3 | 0x8000; ) + (palbase[src]&0x00f800) >> 6 | + (palbase[src]&0x0000f8) >> 3 | 0x8000; ) FUNCTOR(op_rgb15_argb1555, return src | 0x8000; ) FUNCTOR(op_rgb15pal_argb1555, return (palbase[src >> 10] & 0xf8) << 7 | - (palbase[(src >> 5) & 0x1f] & 0xf8) << 2 | - (palbase[src & 0x1f] & 0xf8) >> 3 | 0x8000; ) + (palbase[(src >> 5) & 0x1f] & 0xf8) << 2 | + (palbase[src & 0x1f] & 0xf8) >> 3 | 0x8000; ) FUNCTOR(op_yuv16_uyvy, return src; ) FUNCTOR(op_yuv16pal_uyvy, return (palbase[(src >> 8) & 0xff] << 8) | (src & 0x00ff); ) @@ -106,11 +105,11 @@ FUNCTOR(op_yuv16pal_yuy2, FUNCTOR(op_yuv16_argb32, return (UINT64) ycc_to_rgb((src >> 8) & 0xff, src & 0xff , (src>>16) & 0xff) - | ((UINT64)ycc_to_rgb((src >> 24) & 0xff, src & 0xff , (src>>16) & 0xff) << 32); ) + | ((UINT64)ycc_to_rgb((src >> 24) & 0xff, src & 0xff , (src>>16) & 0xff) << 32); ) FUNCTOR(op_yuv16pal_argb32, return (UINT64)ycc_to_rgb(palbase[(src >> 8) & 0xff], src & 0xff , (src>>16) & 0xff) - | ((UINT64)ycc_to_rgb(palbase[(src >> 24) & 0xff], src & 0xff , (src>>16) & 0xff) << 32);) + | ((UINT64)ycc_to_rgb(palbase[(src >> 24) & 0xff], src & 0xff , (src>>16) & 0xff) << 32);) FUNCTOR(op_yuv16_argb32rot, return pixel_ycc_to_rgb(&src) ; ) @@ -121,7 +120,6 @@ FUNCTOR(op_yuv16pal_argb32rot, return pixel_ycc_to_rgb_pal(&src, palbase); ) //============================================================ struct blit_base { - blit_base(int dest_bpp, bool is_rot, bool is_passthrough) : m_dest_bpp(dest_bpp), m_is_rot(is_rot), m_is_passthrough(is_passthrough) { } @@ -137,24 +135,24 @@ template<typename _src_type, typename _dest_type, typename _op, int _len_div> struct blit_texcopy : public blit_base { blit_texcopy() : blit_base(sizeof(_dest_type) / _len_div, false, false) { } - void texop(const texture_info *texture, const render_texinfo *texsource) const - { - ATTR_UNUSED const rgb_t *palbase = texsource->palette; - int x, y; - /* loop over Y */ - for (y = 0; y < texsource->height; y++) { - _src_type *src = (_src_type *)texsource->base + y * texsource->rowpixels / (_len_div); - _dest_type *dst = (_dest_type *)((UINT8 *)texture->m_pixels + y * texture->m_pitch); - x = texsource->width / (_len_div); - while (x > 0) { - *dst++ = m_op.op(*src, palbase); - src++; - x--; - } - } - } + void texop(const texture_info *texture, const render_texinfo *texsource) const + { + ATTR_UNUSED const rgb_t *palbase = texsource->palette; + int x, y; + /* loop over Y */ + for (y = 0; y < texsource->height; y++) { + _src_type *src = (_src_type *)texsource->base + y * texsource->rowpixels / (_len_div); + _dest_type *dst = (_dest_type *)((UINT8 *)texture->m_pixels + y * texture->m_pitch); + x = texsource->width / (_len_div); + while (x > 0) { + *dst++ = m_op.op(*src, palbase); + src++; + x--; + } + } + } private: - _op m_op; + _op m_op; }; #define TEXCOPYA(a, b, c, d) \ @@ -187,7 +185,7 @@ struct blit_texrot : public blit_base } } private: - _op m_op; + _op m_op; }; #define TEXROTA(a, b, c) \ diff --git a/src/osd/sdl/draw13.c b/src/osd/sdl/draw13.c index d75e2ca0b2b..fdb02c010e5 100644 --- a/src/osd/sdl/draw13.c +++ b/src/osd/sdl/draw13.c @@ -49,12 +49,12 @@ enum static inline bool is_opaque(const float &a) { - return (a >= 1.0f); + return (a >= 1.0f); } static inline bool is_transparent(const float &a) { - return (a < 0.0001f); + return (a < 0.0001f); } //============================================================ @@ -64,11 +64,11 @@ static inline bool is_transparent(const float &a) struct quad_setup_data { - quad_setup_data() - : dudx(0), dvdx(0), dudy(0), dvdy(0), startu(0), startv(0), - rotwidth(0), rotheight(0) - {} - void compute(const render_primitive &prim, const int prescale); + quad_setup_data() + : dudx(0), dvdx(0), dudy(0), dvdy(0), startu(0), startv(0), + rotwidth(0), rotheight(0) + {} + void compute(const render_primitive &prim, const int prescale); INT32 dudx, dvdx, dudy, dvdy; INT32 startu, startv; @@ -85,16 +85,16 @@ struct copy_info_t; /* texture_info holds information about a texture */ class texture_info { - friend class simple_list<texture_info>; + friend class simple_list<texture_info>; public: - texture_info(SDL_Renderer *renderer, const render_texinfo &texsource, const quad_setup_data &setup, const UINT32 flags); - ~texture_info(); + texture_info(SDL_Renderer *renderer, const render_texinfo &texsource, const quad_setup_data &setup, const UINT32 flags); + ~texture_info(); - void set_data(const render_texinfo &texsource, const UINT32 flags); - void render_quad(const render_primitive *prim, const int x, const int y); - bool matches(const render_primitive &prim, const quad_setup_data &setup); + void set_data(const render_texinfo &texsource, const UINT32 flags); + void render_quad(const render_primitive *prim, const int x, const int y); + bool matches(const render_primitive &prim, const quad_setup_data &setup); - copy_info_t *compute_size_type(); + copy_info_t *compute_size_type(); void *m_pixels; // pixels for the texture int m_pitch; @@ -105,31 +105,31 @@ public: osd_ticks_t m_last_access; int raw_width() const { return m_texinfo.width; } - int raw_height() const { return m_texinfo.height; } + int raw_height() const { return m_texinfo.height; } - texture_info *next() { return m_next; } - const render_texinfo &texinfo() const { return m_texinfo; } - render_texinfo &texinfo() { return m_texinfo; } + texture_info *next() { return m_next; } + const render_texinfo &texinfo() const { return m_texinfo; } + render_texinfo &texinfo() { return m_texinfo; } - const HashT hash() const { return m_hash; } - const UINT32 flags() const { return m_flags; } - // FIXME: - const bool is_pixels_owned() const; + const HashT hash() const { return m_hash; } + const UINT32 flags() const { return m_flags; } + // FIXME: + const bool is_pixels_owned() const; private: - Uint32 m_sdl_access; - SDL_Renderer * m_sdl_renderer; - render_texinfo m_texinfo; // copy of the texture info - HashT m_hash; // hash value for the texture (must be >= pointer size) - UINT32 m_flags; // rendering flags + Uint32 m_sdl_access; + SDL_Renderer * m_sdl_renderer; + render_texinfo m_texinfo; // copy of the texture info + HashT m_hash; // hash value for the texture (must be >= pointer size) + UINT32 m_flags; // rendering flags - SDL_Texture * m_texture_id; - bool m_is_rotated; + SDL_Texture * m_texture_id; + bool m_is_rotated; - int m_format; // texture format - SDL_BlendMode m_sdl_blendmode; + int m_format; // texture format + SDL_BlendMode m_sdl_blendmode; - texture_info * m_next; // next texture in the list + texture_info * m_next; // next texture in the list }; //============================================================ @@ -142,13 +142,13 @@ private: class sdl_info13 : public osd_renderer { public: - sdl_info13(osd_window *w) - : osd_renderer(w, FLAG_NONE), m_blittimer(0), m_sdl_renderer(NULL), - m_last_hofs(0), m_last_vofs(0), - m_width(0), m_height(0), - m_blitwidth(0), m_blitheight(0), - m_last_blit_time(0), m_last_blit_pixels(0) - {} + sdl_info13(osd_window *w) + : osd_renderer(w, FLAG_NONE), m_blittimer(0), m_sdl_renderer(NULL), + m_last_hofs(0), m_last_vofs(0), + m_width(0), m_height(0), + m_blitwidth(0), m_blitheight(0), + m_last_blit_time(0), m_last_blit_pixels(0) + {} /* virtual */ int create(); /* virtual */ int draw(const int update); @@ -168,12 +168,12 @@ public: } private: - void render_quad(texture_info *texture, const render_primitive *prim, const int x, const int y); + void render_quad(texture_info *texture, const render_primitive *prim, const int x, const int y); - texture_info *texture_find(const render_primitive &prim, const quad_setup_data &setup); - texture_info *texture_update(const render_primitive &prim); + texture_info *texture_find(const render_primitive &prim, const quad_setup_data &setup); + texture_info *texture_update(const render_primitive &prim); - void destroy_all_textures(); + void destroy_all_textures(); INT32 m_blittimer; @@ -190,11 +190,11 @@ private: float m_last_hofs; float m_last_vofs; - int m_width; - int m_height; + int m_width; + int m_height; - int m_blitwidth; - int m_blitheight; + int m_blitwidth; + int m_blitheight; // Stats INT64 m_last_blit_time; @@ -204,7 +204,7 @@ private: struct copy_info_t { int src_fmt; Uint32 dst_fmt; - const blit_base *blitter; + const blit_base *blitter; Uint32 bm_mask; const char *srcname; const char *dstname; @@ -241,7 +241,7 @@ static void drawsdl2_exit(void); static copy_info_t blit_info_default[] = { /* no rotation */ - ENTRY(ARGB32, ARGB8888, argb32_argb32), + ENTRY(ARGB32, ARGB8888, argb32_argb32), ENTRY_LR(ARGB32, RGB888, argb32_rgb32), /* Entry primarily for directfb */ ENTRY_BM(ARGB32, RGB888, argb32_rgb32, SDL_BLENDMODE_ADD), @@ -249,12 +249,12 @@ static copy_info_t blit_info_default[] = ENTRY_BM(ARGB32, RGB888, argb32_rgb32, SDL_BLENDMODE_NONE), ENTRY(RGB32, ARGB8888, rgb32_argb32), - ENTRY(RGB32, RGB888, rgb32_rgb32), + ENTRY(RGB32, RGB888, rgb32_rgb32), ENTRY(RGB32_PALETTED, ARGB8888, rgb32pal_argb32), ENTRY(RGB32_PALETTED, RGB888, rgb32pal_argb32), - ENTRY(YUY16, UYVY, yuv16_uyvy), + ENTRY(YUY16, UYVY, yuv16_uyvy), ENTRY(YUY16, YUY2, yuv16_yuy2), ENTRY(YUY16, YVYU, yuv16_yvyu), ENTRY(YUY16, ARGB8888, yuv16_argb32), @@ -269,7 +269,7 @@ static copy_info_t blit_info_default[] = ENTRY(PALETTE16, ARGB8888, pal16_argb32), ENTRY(PALETTE16, RGB888, pal16_argb32), - ENTRY(RGB15, RGB555, rgb15_rgb555), + ENTRY(RGB15, RGB555, rgb15_rgb555), ENTRY(RGB15, ARGB1555, rgb15_argb1555), ENTRY(RGB15, ARGB8888, rgb15_argb32), ENTRY(RGB15, RGB888, rgb15_argb32), @@ -647,7 +647,6 @@ void sdl_info13::destroy() int sdl_info13::xy_to_render_target(int x, int y, int *xt, int *yt) { - *xt = x - m_last_hofs; *yt = y - m_last_vofs; if (*xt<0 || *xt >= m_blitwidth) @@ -830,8 +829,8 @@ copy_info_t *texture_info::compute_size_type() // FIXME: const bool texture_info::is_pixels_owned() const { // do we own / allocated it ? - return ((m_sdl_access == SDL_TEXTUREACCESS_STATIC) - && (m_copyinfo->blitter->m_is_passthrough)); + return ((m_sdl_access == SDL_TEXTUREACCESS_STATIC) + && (m_copyinfo->blitter->m_is_passthrough)); } //============================================================ @@ -1098,4 +1097,3 @@ texture_info * sdl_info13::texture_update(const render_primitive &prim) } return texture; } - diff --git a/src/osd/sdl/drawbgfx.c b/src/osd/sdl/drawbgfx.c index a2dc7fe5649..638bf09a5f1 100644 --- a/src/osd/sdl/drawbgfx.c +++ b/src/osd/sdl/drawbgfx.c @@ -33,7 +33,7 @@ #include "osdsdl.h" #include "window.h" -#include <bgfxplatform.h> +#include <bgfxplatform.h> #include <bgfx.h> //============================================================ @@ -73,12 +73,12 @@ static void drawbgfx_exit(void); class sdl_info_bgfx : public osd_renderer { public: - sdl_info_bgfx(osd_window *w) - : osd_renderer(w, FLAG_NONE), m_blittimer(0), m_renderer(NULL), - m_blitwidth(0), m_blitheight(0), - m_last_hofs(0), m_last_vofs(0), - m_last_blit_time(0), m_last_blit_pixels(0) - {} + sdl_info_bgfx(osd_window *w) + : osd_renderer(w, FLAG_NONE), m_blittimer(0), m_renderer(NULL), + m_blitwidth(0), m_blitheight(0), + m_last_hofs(0), m_last_vofs(0), + m_last_blit_time(0), m_last_blit_pixels(0) + {} /* virtual */ int create(); /* virtual */ int draw(const int update); @@ -97,18 +97,18 @@ public: return &window().target()->get_primitives(); } - // void render_quad(texture_info *texture, const render_primitive *prim, const int x, const int y); + // void render_quad(texture_info *texture, const render_primitive *prim, const int x, const int y); - //texture_info *texture_find(const render_primitive &prim, const quad_setup_data &setup); - //texture_info *texture_update(const render_primitive &prim); + //texture_info *texture_find(const render_primitive &prim, const quad_setup_data &setup); + //texture_info *texture_update(const render_primitive &prim); INT32 m_blittimer; SDL_Renderer * m_renderer; //simple_list<texture_info> m_texlist; // list of active textures - int m_blitwidth; - int m_blitheight; + int m_blitwidth; + int m_blitheight; float m_last_hofs; float m_last_vofs; @@ -139,7 +139,7 @@ int drawbgfx_init(running_machine &machine, osd_draw_callbacks *callbacks) // fill in the callbacks callbacks->exit = drawbgfx_exit; callbacks->create = drawbgfx_create; - + return 0; } @@ -159,7 +159,7 @@ int sdl_info_bgfx::create() bgfx::sdlSetWindow(window().sdl_window()); bgfx::init(); bgfx::reset(width, height, BGFX_RESET_VSYNC); - + // Enable debug text. bgfx::setDebug(BGFX_DEBUG_STATS);// BGFX_DEBUG_TEXT); osd_printf_verbose("Leave drawsdl2_window_create\n"); @@ -187,7 +187,6 @@ int sdl_info_bgfx::xy_to_render_target(int x, int y, int *xt, int *yt) int sdl_info_bgfx::draw(int update) { - //if (has_flags(FI_CHANGED) || (window().width() != m_last_width) || (window().height() != m_last_height)) // do something //clear_flags(FI_CHANGED); @@ -207,10 +206,10 @@ int sdl_info_bgfx::draw(int update) window().m_primlist->acquire_lock(); window().m_primlist->release_lock(); - // Advance to next frame. Rendering thread will be kicked to + // Advance to next frame. Rendering thread will be kicked to // process submitted rendering primitives. bgfx::frame(); - + return 0; } diff --git a/src/osd/sdl/drawogl.c b/src/osd/sdl/drawogl.c index 09bcf9479eb..e2178fe73e8 100644 --- a/src/osd/sdl/drawogl.c +++ b/src/osd/sdl/drawogl.c @@ -202,7 +202,7 @@ class texture_info { public: texture_info() - : hash(0), flags(0), rawwidth(0), rawheight(0), + : hash(0), flags(0), rawwidth(0), rawheight(0), rawwidth_create(0), rawheight_create(0), type(0), format(0), borderpix(0), xprescale(0), yprescale(0), nocopy(0), texture(0), texTarget(0), texpow2(0), mpass_dest_idx(0), pbo(0), data(NULL), @@ -337,15 +337,15 @@ private: void texture_all_disable(); INT32 m_blittimer; - int m_width; - int m_height; - int m_blitwidth; - int m_blitheight; + int m_width; + int m_height; + int m_blitwidth; + int m_blitheight; #if (SDLMAME_SDL2) SDL_GLContext m_gl_context_id; #ifdef OSD_WINDOWS - HDC m_hdc; + HDC m_hdc; #endif #else #endif @@ -792,43 +792,42 @@ void sdl_info_ogl::initialize_gl() void setupPixelFormat(HDC hDC) { - PIXELFORMATDESCRIPTOR pfd = { - sizeof(PIXELFORMATDESCRIPTOR), /* size */ - 1, /* version */ - PFD_SUPPORT_OPENGL | - PFD_DRAW_TO_WINDOW | - PFD_DOUBLEBUFFER, /* support double-buffering */ - PFD_TYPE_RGBA, /* color type */ - 32, /* prefered color depth */ - 0, 0, 0, 0, 0, 0, /* color bits (ignored) */ - 0, /* no alpha buffer */ - 0, /* alpha bits (ignored) */ - 0, /* no accumulation buffer */ - 0, 0, 0, 0, /* accum bits (ignored) */ - 16, /* depth buffer */ - 0, /* no stencil buffer */ - 0, /* no auxiliary buffers */ - PFD_MAIN_PLANE, /* main layer */ - 0, /* reserved */ - 0, 0, 0, /* no layer, visible, damage masks */ - }; - int pixelFormat; - - pixelFormat = ChoosePixelFormat(hDC, &pfd); - if (pixelFormat == 0) { - osd_printf_error("ChoosePixelFormat failed.\n"); - exit(1); - } - - if (SetPixelFormat(hDC, pixelFormat, &pfd) != TRUE) { - osd_printf_error("SetPixelFormat failed.\n"); - exit(1); - } + PIXELFORMATDESCRIPTOR pfd = { + sizeof(PIXELFORMATDESCRIPTOR), /* size */ + 1, /* version */ + PFD_SUPPORT_OPENGL | + PFD_DRAW_TO_WINDOW | + PFD_DOUBLEBUFFER, /* support double-buffering */ + PFD_TYPE_RGBA, /* color type */ + 32, /* prefered color depth */ + 0, 0, 0, 0, 0, 0, /* color bits (ignored) */ + 0, /* no alpha buffer */ + 0, /* alpha bits (ignored) */ + 0, /* no accumulation buffer */ + 0, 0, 0, 0, /* accum bits (ignored) */ + 16, /* depth buffer */ + 0, /* no stencil buffer */ + 0, /* no auxiliary buffers */ + PFD_MAIN_PLANE, /* main layer */ + 0, /* reserved */ + 0, 0, 0, /* no layer, visible, damage masks */ + }; + int pixelFormat; + + pixelFormat = ChoosePixelFormat(hDC, &pfd); + if (pixelFormat == 0) { + osd_printf_error("ChoosePixelFormat failed.\n"); + exit(1); + } + + if (SetPixelFormat(hDC, pixelFormat, &pfd) != TRUE) { + osd_printf_error("SetPixelFormat failed.\n"); + exit(1); + } } #endif int sdl_info_ogl::create() { - #if (SDLMAME_SDL2) // create renderer #ifdef OSD_WINDOWS @@ -889,7 +888,6 @@ int sdl_info_ogl::create() void sdl_info_ogl::destroy() { - // free the memory in the window destroy_all_textures(); @@ -912,7 +910,6 @@ void sdl_info_ogl::destroy() int sdl_info_ogl::xy_to_render_target(int x, int y, int *xt, int *yt) { - *xt = x - m_last_hofs; *yt = y - m_last_vofs; if (*xt<0 || *xt >= m_blitwidth) @@ -3136,6 +3133,3 @@ void sdl_info_ogl::texture_all_disable() pfn_glBindBuffer( GL_PIXEL_UNPACK_BUFFER_ARB, 0); } } - - - diff --git a/src/osd/sdl/drawsdl.c b/src/osd/sdl/drawsdl.c index 1c626696ce4..45ac54fa64b 100644 --- a/src/osd/sdl/drawsdl.c +++ b/src/osd/sdl/drawsdl.c @@ -434,11 +434,10 @@ static void drawsdl_show_info(struct SDL_RendererInfo *render_info) int sdl_info::create() { - #if (SDLMAME_SDL2) const sdl_scale_mode *sm = &scale_modes[video_config.scale_mode]; - // create renderer + // create renderer /* set hints ... */ SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, sm->sdl_scale_mode); @@ -500,7 +499,6 @@ int sdl_info::create() void sdl_info::destroy() { - // free the memory in the window destroy_all_textures(); @@ -726,7 +724,7 @@ int sdl_info::draw(int update) float fh = (float) mameheight / (float) blitheight; // FIXME: this could be a lot easier if we get the primlist here! - // Bounds would be set fit for purpose and done! + // Bounds would be set fit for purpose and done! for (render_primitive *prim = window().m_primlist->first(); prim != NULL; prim = prim->next()) { diff --git a/src/osd/sdl/sdl.mak b/src/osd/sdl/sdl.mak index 5fe16406090..83a4bdc6d37 100644 --- a/src/osd/sdl/sdl.mak +++ b/src/osd/sdl/sdl.mak @@ -365,8 +365,8 @@ SDL_NETWORK = pcap INCPATH += -I$(3RDPARTY)/winpcap/Include # enable UNICODE -DEFS += -Dmain=utf8_main -DUNICODE -D_UNICODE -LDFLAGS += -municode +DEFS += -Dmain=utf8_main -DUNICODE -D_UNICODE +LDFLAGS += -municode # Qt ifndef NO_USE_QTDEBUG @@ -734,7 +734,7 @@ ifeq ($(SDL_LIBVER),sdl2) LIBS += -lSDL2 -limm32 -lversion -lole32 -loleaut32 -lws2_32 -static BASELIBS += -lSDL2 -limm32 -lversion -lole32 -loleaut32 -lws2_32 -static else -LIBS += -lSDL -lws2_32 -static +LIBS += -lSDL -lws2_32 -static BASELIBS += -lSDL -lws2_32 -static endif LIBS += -luser32 -lgdi32 -lddraw -ldsound -ldxguid -lwinmm -ladvapi32 -lcomctl32 -lshlwapi @@ -809,7 +809,7 @@ OSDOBJS += \ ifdef USE_BGFX DEFS += -DUSE_BGFX -OSDOBJS += $(SDLOBJ)/drawbgfx.o +OSDOBJS += $(SDLOBJ)/drawbgfx.o INCPATH += -I$(3RDPARTY)/bgfx/include -I$(3RDPARTY)/bx/include USE_DISPATCH_GL = 0 BGFX_LIB = $(OBJ)/libbgfx.a diff --git a/src/osd/sdl/video.h b/src/osd/sdl/video.h index fc601eb48ce..8f3acb8460d 100644 --- a/src/osd/sdl/video.h +++ b/src/osd/sdl/video.h @@ -66,7 +66,7 @@ public: sdl_monitor_info() : m_next(NULL), m_handle(0), m_aspect(0.0f) - {} + {} sdl_monitor_info(const UINT64 handle, const char *monitor_device, float aspect) : m_next(NULL), m_handle(handle), m_aspect(aspect) { @@ -84,25 +84,25 @@ public: void set_aspect(const float aspect) { m_aspect = aspect; } // STATIC - static void init(); + static void init(); static void exit(); static sdl_monitor_info *pick_monitor(sdl_options &options, int index); #if !defined(SDLMAME_WIN32) && !(SDLMAME_SDL2) static void add_primary_monitor(void *data); #endif - sdl_monitor_info * next() { return m_next; } // pointer to next monitor in list + sdl_monitor_info * next() { return m_next; } // pointer to next monitor in list // STATIC static sdl_monitor_info *primary_monitor; static sdl_monitor_info *list; - sdl_monitor_info * m_next; // pointer to next monitor in list + sdl_monitor_info * m_next; // pointer to next monitor in list private: void refresh(); UINT64 m_handle; // handle to the monitor - SDL_Rect m_dimensions; + SDL_Rect m_dimensions; char m_name[64]; float m_aspect; // computed/configured aspect ratio of the physical device }; diff --git a/src/osd/sdl/window.c b/src/osd/sdl/window.c index dae4ef5dc18..71054ce32b3 100644 --- a/src/osd/sdl/window.c +++ b/src/osd/sdl/window.c @@ -1013,9 +1013,6 @@ void sdl_window_info::update() // if we're visible and running and not in the middle of a resize, draw if (m_target != NULL) { - - - int tempwidth, tempheight; // see if the games video mode has changed @@ -1044,7 +1041,6 @@ void sdl_window_info::update() if (osd_event_wait(m_rendered_event, event_wait_ticks)) { - // ensure the target bounds are up-to-date, and then get the primitives render_primitive_list &primlist = *m_renderer->get_primitives(); @@ -1150,11 +1146,11 @@ OSDWORK_CALLBACK( sdl_window_info::complete_create_wt ) SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); /* FIXME: A reminder that gamma is wrong throughout MAME. Currently, SDL2.0 doesn't seem to - * support the following attribute although my hardware lists GL_ARB_framebuffer_sRGB as an extension. - * - * SDL_GL_SetAttribute( SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, 1 ); - * - */ + * support the following attribute although my hardware lists GL_ARB_framebuffer_sRGB as an extension. + * + * SDL_GL_SetAttribute( SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, 1 ); + * + */ window->m_extra_flags = SDL_WINDOW_OPENGL; } else @@ -1173,7 +1169,7 @@ OSDWORK_CALLBACK( sdl_window_info::complete_create_wt ) window->monitor()->position_size().x, window->monitor()->position_size().y, tempwidth, tempheight, window->m_extra_flags); //window().sdl_window() = SDL_CreateWindow(window().m_title, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, - // width, height, m_extra_flags); + // width, height, m_extra_flags); if ( window->m_sdl_window == NULL ) { @@ -1235,7 +1231,7 @@ OSDWORK_CALLBACK( sdl_window_info::complete_create_wt ) #if (SDL_VERSION_ATLEAST(1,2,10)) && (!defined(SDLMAME_EMSCRIPTEN)) SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, video_config.waitvsync ? 1 : 0); #endif - // load_gl_lib(window->machine()); + // load_gl_lib(window->machine()); } // create the SDL surface (which creates the window in windowed mode) diff --git a/src/osd/sdl/window.h b/src/osd/sdl/window.h index 8c10c9130e8..3c0c7278210 100644 --- a/src/osd/sdl/window.h +++ b/src/osd/sdl/window.h @@ -53,7 +53,7 @@ public: #endif m_prescale(1), m_primlist(NULL) - {} + {} virtual ~osd_window() { } virtual render_target *target() = 0; @@ -81,18 +81,18 @@ public: virtual win_monitor_info *winwindow_video_window_monitor(const RECT *proposed) = 0; // window handle and info - HWND m_hwnd; - HDC m_dc; // only used by GDI renderer! + HWND m_hwnd; + HDC m_dc; // only used by GDI renderer! // FIXME: this is the same as win_window_list->m_hwnd, i.e. first window. // During modularization, this should be passed in differently - HWND m_focus_hwnd; + HWND m_focus_hwnd; - int m_resize_state; + int m_resize_state; #endif - osd_window_config m_win_config; - int m_prescale; - render_primitive_list *m_primlist; + osd_window_config m_win_config; + int m_prescale; + render_primitive_list *m_primlist; }; class osd_renderer @@ -100,13 +100,13 @@ class osd_renderer public: /* Generic flags */ - static const int FLAG_NONE = 0x0000; - static const int FLAG_NEEDS_OPENGL = 0x0001; - static const int FLAG_HAS_VECTOR_SCREEN = 0x0002; + static const int FLAG_NONE = 0x0000; + static const int FLAG_NEEDS_OPENGL = 0x0001; + static const int FLAG_HAS_VECTOR_SCREEN = 0x0002; /* SDL 1.2 flags */ - static const int FLAG_NEEDS_DOUBLEBUF = 0x0100; - static const int FLAG_NEEDS_ASYNCBLIT = 0x0200; + static const int FLAG_NEEDS_DOUBLEBUF = 0x0100; + static const int FLAG_NEEDS_ASYNCBLIT = 0x0200; osd_renderer(osd_window *window, const int flags) : m_window(window), m_flags(flags) { } @@ -139,11 +139,11 @@ public: protected: /* Internal flags */ - static const int FI_CHANGED = 0x010000; + static const int FI_CHANGED = 0x010000; private: - osd_window *m_window; + osd_window *m_window; int m_flags; }; @@ -161,7 +161,7 @@ public: m_resize_height(0), m_last_resize(0), #endif - m_minwidth(0), m_minheight(0), + m_minwidth(0), m_minheight(0), m_rendered_event(0), m_target(0), #if (SDLMAME_SDL2) m_sdl_window(NULL), @@ -256,7 +256,7 @@ private: SDL_Surface *m_sdlsurf; #endif - int m_extra_flags; + int m_extra_flags; void set_renderer(osd_renderer *renderer) { @@ -281,7 +281,7 @@ private: sdl_monitor_info * m_monitor; int m_fullscreen; int m_index; - osd_renderer * m_renderer; + osd_renderer * m_renderer; // static callbacks ... diff --git a/src/osd/windows/d3dhlsl.h b/src/osd/windows/d3dhlsl.h index 7f3a6bdf169..8b8904123b2 100644 --- a/src/osd/windows/d3dhlsl.h +++ b/src/osd/windows/d3dhlsl.h @@ -335,8 +335,8 @@ private: base * d3dintf; // D3D interface - running_machine * machine; - d3d::renderer * d3d; // D3D renderer + running_machine * machine; + d3d::renderer * d3d; // D3D renderer bool master_enable; // overall enable flag bool vector_enable; // vector post-processing enable flag diff --git a/src/osd/windows/drawbgfx.c b/src/osd/windows/drawbgfx.c index 1444138a0ad..3061f32b591 100644 --- a/src/osd/windows/drawbgfx.c +++ b/src/osd/windows/drawbgfx.c @@ -19,7 +19,7 @@ // MAMEOS headers #include "window.h" -#include <bgfxplatform.h> +#include <bgfxplatform.h> #include <bgfx.h> class renderer_bgfx : public osd_renderer @@ -95,7 +95,7 @@ int renderer_bgfx::create() bgfx::winSetHwnd(window().m_hwnd); bgfx::init(); bgfx::reset(rect_width(&client), rect_height(&client), BGFX_RESET_VSYNC); - + // Enable debug text. bgfx::setDebug(BGFX_DEBUG_STATS);// BGFX_DEBUG_TEXT); @@ -165,70 +165,70 @@ int renderer_bgfx::draw(int update) */ case render_primitive::LINE: // check if it's really a point -/* - if (((prim->bounds.x1 - prim->bounds.x0) == 0) && ((prim->bounds.y1 - prim->bounds.y0) == 0)) - { - curPrimitive=GL_POINTS; - } else { - curPrimitive=GL_LINES; - } - - if(pendingPrimitive!=GL_NO_PRIMITIVE && pendingPrimitive!=curPrimitive) - { - glEnd(); - pendingPrimitive=GL_NO_PRIMITIVE; - } - - if ( pendingPrimitive==GL_NO_PRIMITIVE ) - { - set_blendmode(sdl, PRIMFLAG_GET_BLENDMODE(prim->flags)); - } - - glColor4f(prim->color.r, prim->color.g, prim->color.b, prim->color.a); - - if(pendingPrimitive!=curPrimitive) - { - glBegin(curPrimitive); - pendingPrimitive=curPrimitive; - } - - // check if it's really a point - if (curPrimitive==GL_POINTS) - { - glVertex2f(prim->bounds.x0+hofs, prim->bounds.y0+vofs); - } - else - { - glVertex2f(prim->bounds.x0+hofs, prim->bounds.y0+vofs); - glVertex2f(prim->bounds.x1+hofs, prim->bounds.y1+vofs); - }*/ +/* + if (((prim->bounds.x1 - prim->bounds.x0) == 0) && ((prim->bounds.y1 - prim->bounds.y0) == 0)) + { + curPrimitive=GL_POINTS; + } else { + curPrimitive=GL_LINES; + } + + if(pendingPrimitive!=GL_NO_PRIMITIVE && pendingPrimitive!=curPrimitive) + { + glEnd(); + pendingPrimitive=GL_NO_PRIMITIVE; + } + + if ( pendingPrimitive==GL_NO_PRIMITIVE ) + { + set_blendmode(sdl, PRIMFLAG_GET_BLENDMODE(prim->flags)); + } + + glColor4f(prim->color.r, prim->color.g, prim->color.b, prim->color.a); + + if(pendingPrimitive!=curPrimitive) + { + glBegin(curPrimitive); + pendingPrimitive=curPrimitive; + } + + // check if it's really a point + if (curPrimitive==GL_POINTS) + { + glVertex2f(prim->bounds.x0+hofs, prim->bounds.y0+vofs); + } + else + { + glVertex2f(prim->bounds.x0+hofs, prim->bounds.y0+vofs); + glVertex2f(prim->bounds.x1+hofs, prim->bounds.y1+vofs); + }*/ break; case render_primitive::QUAD: /* - if(pendingPrimitive!=GL_NO_PRIMITIVE) - { - glEnd(); - pendingPrimitive=GL_NO_PRIMITIVE; - } + if(pendingPrimitive!=GL_NO_PRIMITIVE) + { + glEnd(); + pendingPrimitive=GL_NO_PRIMITIVE; + } + + glColor4f(prim->color.r, prim->color.g, prim->color.b, prim->color.a); - glColor4f(prim->color.r, prim->color.g, prim->color.b, prim->color.a); + set_blendmode(sdl, PRIMFLAG_GET_BLENDMODE(prim->flags)); - set_blendmode(sdl, PRIMFLAG_GET_BLENDMODE(prim->flags)); + texture = texture_update(window, prim, 0); - texture = texture_update(window, prim, 0); - - sdl->texVerticex[0]=prim->bounds.x0 + hofs; - sdl->texVerticex[1]=prim->bounds.y0 + vofs; - sdl->texVerticex[2]=prim->bounds.x1 + hofs; - sdl->texVerticex[3]=prim->bounds.y0 + vofs; - sdl->texVerticex[4]=prim->bounds.x1 + hofs; - sdl->texVerticex[5]=prim->bounds.y1 + vofs; - sdl->texVerticex[6]=prim->bounds.x0 + hofs; - sdl->texVerticex[7]=prim->bounds.y1 + vofs; + sdl->texVerticex[0]=prim->bounds.x0 + hofs; + sdl->texVerticex[1]=prim->bounds.y0 + vofs; + sdl->texVerticex[2]=prim->bounds.x1 + hofs; + sdl->texVerticex[3]=prim->bounds.y0 + vofs; + sdl->texVerticex[4]=prim->bounds.x1 + hofs; + sdl->texVerticex[5]=prim->bounds.y1 + vofs; + sdl->texVerticex[6]=prim->bounds.x0 + hofs; + sdl->texVerticex[7]=prim->bounds.y1 + vofs; - glDrawArrays(GL_QUADS, 0, 4); + glDrawArrays(GL_QUADS, 0, 4); */ break; @@ -238,7 +238,7 @@ int renderer_bgfx::draw(int update) } window().m_primlist->release_lock(); - // Advance to next frame. Rendering thread will be kicked to + // Advance to next frame. Rendering thread will be kicked to // process submitted rendering primitives. bgfx::frame(); diff --git a/src/osd/windows/drawdd.c b/src/osd/windows/drawdd.c index 195a3190573..f56ffd4b989 100644 --- a/src/osd/windows/drawdd.c +++ b/src/osd/windows/drawdd.c @@ -140,8 +140,8 @@ struct monitor_enum_info /* mode_enum_info holds information during a display mode enumeration */ struct mode_enum_info { - renderer_dd * renderer; - osd_window * window; + renderer_dd * renderer; + osd_window * window; INT32 minimum_width, minimum_height; INT32 target_width, target_height; double target_refresh; diff --git a/src/osd/windows/drawgdi.c b/src/osd/windows/drawgdi.c index 86baf429202..ccbbc6c03eb 100644 --- a/src/osd/windows/drawgdi.c +++ b/src/osd/windows/drawgdi.c @@ -94,7 +94,6 @@ static void drawgdi_exit(void) int renderer_gdi::create() { - // fill in the bitmap info header bminfo.bmiHeader.biSize = sizeof(bminfo.bmiHeader); bminfo.bmiHeader.biPlanes = 1; @@ -117,7 +116,6 @@ int renderer_gdi::create() void renderer_gdi::destroy() { - // free the bitmap memory if (bmdata != NULL) global_free_array(bmdata); diff --git a/src/osd/windows/video.h b/src/osd/windows/video.h index 5cd54455213..79aca4d5b4d 100644 --- a/src/osd/windows/video.h +++ b/src/osd/windows/video.h @@ -64,7 +64,7 @@ private: MONITORINFOEX m_info; // most recently retrieved info float m_aspect; // computed/configured aspect ratio of the physical device - char * m_name; + char * m_name; }; diff --git a/src/osd/windows/window.h b/src/osd/windows/window.h index 882f0aef00d..7e99ec04b38 100644 --- a/src/osd/windows/window.h +++ b/src/osd/windows/window.h @@ -53,7 +53,7 @@ public: #endif m_prescale(1), m_primlist(NULL) - {} + {} virtual ~osd_window() { } virtual render_target *target() = 0; @@ -81,18 +81,18 @@ public: virtual win_monitor_info *winwindow_video_window_monitor(const RECT *proposed) = 0; // window handle and info - HWND m_hwnd; - HDC m_dc; // only used by GDI renderer! + HWND m_hwnd; + HDC m_dc; // only used by GDI renderer! // FIXME: this is the same as win_window_list->m_hwnd, i.e. first window. // During modularization, this should be passed in differently - HWND m_focus_hwnd; + HWND m_focus_hwnd; - int m_resize_state; + int m_resize_state; #endif - osd_window_config m_win_config; - int m_prescale; - render_primitive_list * m_primlist; + osd_window_config m_win_config; + int m_prescale; + render_primitive_list * m_primlist; }; class osd_renderer @@ -100,13 +100,13 @@ class osd_renderer public: /* Generic flags */ - static const int FLAG_NONE = 0x0000; - static const int FLAG_NEEDS_OPENGL = 0x0001; - static const int FLAG_HAS_VECTOR_SCREEN = 0x0002; + static const int FLAG_NONE = 0x0000; + static const int FLAG_NEEDS_OPENGL = 0x0001; + static const int FLAG_HAS_VECTOR_SCREEN = 0x0002; /* SDL 1.2 flags */ - static const int FLAG_NEEDS_DOUBLEBUF = 0x0100; - static const int FLAG_NEEDS_ASYNCBLIT = 0x0200; + static const int FLAG_NEEDS_DOUBLEBUF = 0x0100; + static const int FLAG_NEEDS_ASYNCBLIT = 0x0200; osd_renderer(osd_window *window, const int flags) : m_window(window), m_flags(flags) { } @@ -139,11 +139,11 @@ public: protected: /* Internal flags */ - static const int FI_CHANGED = 0x010000; + static const int FI_CHANGED = 0x010000; private: - osd_window *m_window; + osd_window *m_window; int m_flags; }; diff --git a/src/osd/windows/windows.mak b/src/osd/windows/windows.mak index 631c70dc3bb..62c9c11c74c 100644 --- a/src/osd/windows/windows.mak +++ b/src/osd/windows/windows.mak @@ -399,7 +399,7 @@ OSDOBJS = \ $(OSDOBJ)/modules/netdev/none.o \ ifdef USE_OPENGL -OSDOBJS += $(WINOBJ)/../sdl/drawogl.o $(WINOBJ)/../sdl/gl_shader_tool.o $(WINOBJ)/../sdl/gl_shader_mgr.o +OSDOBJS += $(WINOBJ)/../sdl/drawogl.o $(WINOBJ)/../sdl/gl_shader_tool.o $(WINOBJ)/../sdl/gl_shader_mgr.o OBJDIRS += $(WINOBJ)/../sdl DEFS += -DUSE_OPENGL=1 @@ -414,7 +414,7 @@ DEFS += -DUSE_SDL_SOUND endif ifndef DONT_USE_NETWORK -DEFS += -DSDLMAME_NET_PCAP +DEFS += -DSDLMAME_NET_PCAP endif CCOMFLAGS += -DDIRECT3D_VERSION=0x0900 |
