| [src/emu] | input.cpp |
| [src/osd] | strconv.cpp |
| [src/osd/modules/debugger] | debugint.cpp debugwin.cpp |
| [src/osd/modules/debugger/win] | consolewininfo.cpp debugviewinfo.cpp debugwininfo.cpp disasmwininfo.cpp logwininfo.cpp memorywininfo.cpp pointswininfo.cpp uimetrics.cpp |
| [src/osd/modules/font] | font_none.cpp font_windows.cpp |
| [src/osd/modules/midi] | none.cpp portmidi.cpp |
| [src/osd/modules/netdev] | pcap.cpp |
| [src/osd/modules/render] | drawd3d.cpp drawdd.cpp drawnone.cpp drawogl.cpp |
| [src/osd/modules/render/d3d] | d3d9intf.cpp d3dhlsl.cpp d3dhlsl.h |
| [src/osd/modules/sound] | direct_sound.cpp |
| [src/osd/modules/sync] | work_osd.cpp |
| [src/osd/windows] | input.cpp output.cpp video.cpp winclip.cpp window.cpp winfile.cpp winmain.cpp winsocket.cpp winutf8.cpp winutil.cpp |
trunk/src/osd/modules/debugger/debugint.cpp
| r250192 | r250193 | |
| 17 | 17 | #include "debug/debugvw.h" |
| 18 | 18 | #include "debug/dvdisasm.h" |
| 19 | 19 | #include "debug/dvmemory.h" |
| 20 | | #include "debug/dvstate.h" |
| 21 | 20 | #include "debug/debugcon.h" |
| 22 | 21 | #include "debug/debugcpu.h" |
| 23 | 22 | |
| r250192 | r250193 | |
| 151 | 150 | DISABLE_COPYING(DView_edit); |
| 152 | 151 | |
| 153 | 152 | public: |
| 154 | | DView_edit() |
| 155 | | { } |
| 156 | | ~DView_edit() |
| 157 | | { } |
| 153 | DView_edit(): active(0), container(NULL) { } |
| 154 | ~DView_edit() { } |
| 158 | 155 | int active; |
| 159 | 156 | render_container * container; |
| 160 | 157 | std::string str; |
| r250192 | r250193 | |
| 1131 | 1128 | x1 += UI_BOX_LR_BORDER; |
| 1132 | 1129 | x2 -= UI_BOX_LR_BORDER; |
| 1133 | 1130 | y1 += UI_BOX_TB_BORDER; |
| 1134 | | y2 -= UI_BOX_TB_BORDER; |
| 1135 | 1131 | |
| 1136 | 1132 | /* draw the text within it */ |
| 1137 | 1133 | editor->container->manager().machine().ui().draw_text_full(editor->container, editor->str.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, |
trunk/src/osd/modules/debugger/win/disasmwininfo.cpp
| r250192 | r250193 | |
| 11 | 11 | #include "debugviewinfo.h" |
| 12 | 12 | #include "disasmviewinfo.h" |
| 13 | 13 | #include "uimetrics.h" |
| 14 | | |
| 15 | | #include "debugger.h" |
| 16 | | #include "debug/debugcon.h" |
| 17 | | #include "debug/debugcpu.h" |
| 18 | | |
| 19 | 14 | #include "winutf8.h" |
| 20 | 15 | |
| 21 | 16 | |
| r250192 | r250193 | |
| 38 | 33 | update_caption(); |
| 39 | 34 | |
| 40 | 35 | // recompute the children once to get the maxwidth |
| 41 | | recompute_children(); |
| 36 | disasmwin_info::recompute_children(); |
| 42 | 37 | |
| 43 | 38 | // position the window and recompute children again |
| 44 | 39 | SetWindowPos(window(), HWND_TOP, 100, 100, maxwidth(), 200, SWP_SHOWWINDOW); |
| 45 | | recompute_children(); |
| 40 | disasmwin_info::recompute_children(); |
| 46 | 41 | |
| 47 | 42 | // mark the edit box as the default focus and set it |
| 48 | | set_default_focus(); |
| 43 | editwin_info::set_default_focus(); |
| 49 | 44 | } |
| 50 | 45 | |
| 51 | 46 | |
trunk/src/osd/modules/debugger/win/memorywininfo.cpp
| r250192 | r250193 | |
| 59 | 59 | update_caption(); |
| 60 | 60 | |
| 61 | 61 | // recompute the children once to get the maxwidth |
| 62 | | recompute_children(); |
| 62 | memorywin_info::recompute_children(); |
| 63 | 63 | |
| 64 | 64 | // position the window and recompute children again |
| 65 | 65 | SetWindowPos(window(), HWND_TOP, 100, 100, maxwidth(), 200, SWP_SHOWWINDOW); |
| 66 | | recompute_children(); |
| 66 | memorywin_info::recompute_children(); |
| 67 | 67 | |
| 68 | 68 | // mark the edit box as the default focus and set it |
| 69 | | set_default_focus(); |
| 69 | editwin_info::set_default_focus(); |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | |
trunk/src/osd/modules/debugger/win/uimetrics.cpp
| r250192 | r250193 | |
| 31 | 31 | m_debug_font = CreateFont(-MulDiv((size <= 0) ? 9 : size, GetDeviceCaps(temp_dc, LOGPIXELSY), 72), 0, 0, 0, FW_MEDIUM, FALSE, FALSE, FALSE, |
| 32 | 32 | ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FIXED_PITCH, t_face); |
| 33 | 33 | osd_free(t_face); |
| 34 | | t_face = NULL; |
| 35 | 34 | |
| 36 | 35 | if (m_debug_font == NULL) |
| 37 | 36 | fatalerror("Unable to create debugger font\n"); |
trunk/src/osd/modules/netdev/pcap.cpp
| r250192 | r250193 | |
| 168 | 168 | m_p = NULL; |
| 169 | 169 | return; |
| 170 | 170 | } |
| 171 | | set_mac(get_mac()); |
| 171 | netdev_pcap::set_mac(get_mac()); |
| 172 | 172 | |
| 173 | 173 | #ifdef SDLMAME_MACOSX |
| 174 | 174 | m_ctx.head = 0; |
| r250192 | r250193 | |
| 206 | 206 | ret = pcap_sendpacket_dl(m_p, buf, len); |
| 207 | 207 | printf("sent packet length %d, returned %d\n", len, ret); |
| 208 | 208 | return ret ? len : 0; |
| 209 | | return (!pcap_sendpacket_dl(m_p, buf, len))?len:0; |
| 209 | //return (!pcap_sendpacket_dl(m_p, buf, len))?len:0; |
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | int netdev_pcap::recv_dev(UINT8 **buf) |
trunk/src/osd/modules/render/d3d/d3dhlsl.cpp
| r250192 | r250193 | |
| 29 | 29 | #include "render.h" |
| 30 | 30 | #include "ui/ui.h" |
| 31 | 31 | #include "rendutil.h" |
| 32 | | #include "options.h" |
| 33 | 32 | #include "emuopts.h" |
| 34 | 33 | #include "aviio.h" |
| 35 | 34 | #include "png.h" |
| r250192 | r250193 | |
| 39 | 38 | #include "d3dintf.h" |
| 40 | 39 | #include "winmain.h" |
| 41 | 40 | #include "window.h" |
| 42 | | #include "config.h" |
| 43 | 41 | #include "d3dcomm.h" |
| 44 | 42 | #include "modules/render/drawd3d.h" |
| 45 | 43 | #include "strconv.h" |
| r250192 | r250193 | |
| 178 | 176 | // shader manager constructor |
| 179 | 177 | //============================================================ |
| 180 | 178 | |
| 181 | | shaders::shaders() |
| 179 | shaders::shaders(): |
| 180 | d3dintf(NULL), machine(NULL), d3d(NULL), num_screens(0), curr_screen(0), curr_frame(0), write_ini(false), read_ini(false), hlsl_prescale_x(0), hlsl_prescale_y(0), bloom_count(0), |
| 181 | vecbuf_type(), vecbuf_index(0), vecbuf_count(0), avi_output_file(NULL), avi_frame(0), avi_copy_surface(NULL), avi_copy_texture(NULL), avi_final_target(NULL), avi_final_texture(NULL), |
| 182 | black_surface(NULL), black_texture(NULL), render_snap(false), snap_rendered(false), snap_copy_target(NULL), snap_copy_texture(NULL), snap_target(NULL), snap_texture(NULL), |
| 183 | snap_width(0), snap_height(0), lines_pending(false), backbuffer(NULL), curr_effect(NULL), default_effect(NULL), prescale_effect(NULL), post_effect(NULL), distortion_effect(NULL), |
| 184 | focus_effect(NULL), phosphor_effect(NULL), deconverge_effect(NULL), color_effect(NULL), yiq_encode_effect(NULL), yiq_decode_effect(NULL), bloom_effect(NULL), |
| 185 | downsample_effect(NULL), vector_effect(NULL), fsfx_vertices(NULL), curr_texture(NULL), curr_render_target(NULL), curr_poly(NULL) |
| 186 | |
| 182 | 187 | { |
| 183 | 188 | master_enable = false; |
| 184 | 189 | vector_enable = true; |
| r250192 | r250193 | |
| 3435 | 3440 | // find length of the device name |
| 3436 | 3441 | int end1 = snapstr.find("/", pos + 3); |
| 3437 | 3442 | int end2 = snapstr.find("%", pos + 3); |
| 3438 | | int end = -1; |
| 3443 | int end; |
| 3439 | 3444 | |
| 3440 | 3445 | if ((end1 != -1) && (end2 != -1)) |
| 3441 | 3446 | { |
trunk/src/osd/modules/render/drawd3d.cpp
| r250192 | r250193 | |
| 27 | 27 | // MAME headers |
| 28 | 28 | #include "emu.h" |
| 29 | 29 | #include "render.h" |
| 30 | | #include "ui/ui.h" |
| 30 | |
| 31 | 31 | #include "rendutil.h" |
| 32 | | #include "options.h" |
| 33 | 32 | #include "emuopts.h" |
| 34 | 33 | #include "aviio.h" |
| 35 | | #include "png.h" |
| 36 | 34 | |
| 37 | 35 | // MAMEOS headers |
| 38 | 36 | #include "modules/render/d3d/d3dintf.h" |
| 39 | 37 | #include "winmain.h" |
| 40 | 38 | #include "window.h" |
| 41 | | #include "config.h" |
| 42 | | #include "strconv.h" |
| 43 | 39 | #include "modules/render/d3d/d3dcomm.h" |
| 44 | 40 | #include "drawd3d.h" |
| 45 | 41 | |
| r250192 | r250193 | |
| 616 | 612 | } |
| 617 | 613 | |
| 618 | 614 | renderer::renderer(osd_window *window) |
| 619 | | : osd_renderer(window, FLAG_NONE) |
| 615 | : osd_renderer(window, FLAG_NONE), m_adapter(0), m_width(0), m_height(0), m_refresh(0), m_create_error_count(0), m_device(NULL), m_gamma_supported(0), m_pixformat(), |
| 616 | m_vertexbuf(NULL), m_lockedbuf(NULL), m_numverts(0), m_vectorbatch(NULL), m_batchindex(0), m_numpolys(0), m_restarting(false), m_mod2x_supported(0), m_mod4x_supported(0), |
| 617 | m_screen_format(), m_last_texture(NULL), m_last_texture_flags(0), m_last_blendenable(0), m_last_blendop(0), m_last_blendsrc(0), m_last_blenddst(0), m_last_filter(0), |
| 618 | m_last_wrap(), m_last_modmode(0), m_hlsl_buf(NULL), m_shaders(NULL), m_texture_manager(NULL), m_line_count(0) |
| 620 | 619 | { |
| 621 | | m_device = NULL; |
| 622 | | m_restarting = false; |
| 623 | | m_shaders = NULL; |
| 624 | | m_numverts = 0; |
| 625 | | m_numpolys = 0; |
| 626 | | m_vertexbuf = NULL; |
| 627 | | m_lockedbuf = NULL; |
| 628 | | m_vectorbatch = NULL; |
| 629 | | m_last_texture = NULL; |
| 630 | | m_hlsl_buf = NULL; |
| 631 | | m_texture_manager = NULL; |
| 632 | 620 | } |
| 633 | 621 | |
| 634 | 622 | int renderer::initialize() |
trunk/src/osd/modules/sync/work_osd.cpp
| r250192 | r250193 | |
| 444 | 444 | osd_work_item *item; |
| 445 | 445 | |
| 446 | 446 | // first allocate a new work item; try the free list first |
| 447 | | INT32 lockslot = osd_scalable_lock_acquire(queue->lock); |
| 447 | INT32 myslot = osd_scalable_lock_acquire(queue->lock); |
| 448 | 448 | do |
| 449 | 449 | { |
| 450 | 450 | item = (osd_work_item *)queue->free; |
| 451 | 451 | } while (item != NULL && compare_exchange_ptr((PVOID volatile *)&queue->free, item, item->next) != item); |
| 452 | | osd_scalable_lock_release(queue->lock, lockslot); |
| 452 | osd_scalable_lock_release(queue->lock, myslot); |
| 453 | 453 | |
| 454 | 454 | // if nothing, allocate something new |
| 455 | 455 | if (item == NULL) |
trunk/src/osd/windows/video.cpp
| r250192 | r250193 | |
| 13 | 13 | // MAME headers |
| 14 | 14 | #include "emu.h" |
| 15 | 15 | #include "emuopts.h" |
| 16 | | #include "osdepend.h" |
| 17 | | #include "video/vector.h" |
| 18 | 16 | #include "render.h" |
| 19 | | #include "rendutil.h" |
| 20 | | #include "ui/ui.h" |
| 21 | 17 | #include "uiinput.h" |
| 22 | 18 | |
| 23 | 19 | // MAMEOS headers |
| r250192 | r250193 | |
| 26 | 22 | #include "window.h" |
| 27 | 23 | #include "input.h" |
| 28 | 24 | #include "strconv.h" |
| 29 | | #include "config.h" |
| 30 | 25 | |
| 31 | 26 | //============================================================ |
| 32 | 27 | // CONSTANTS |
| r250192 | r250193 | |
| 113 | 108 | win_monitor_info::win_monitor_info(const HMONITOR handle, const char *monitor_device, float aspect) |
| 114 | 109 | : osd_monitor_info(&m_handle, monitor_device, aspect), m_handle(handle) |
| 115 | 110 | { |
| 116 | | refresh(); |
| 111 | win_monitor_info::refresh(); |
| 117 | 112 | } |
| 118 | 113 | |
| 119 | 114 | win_monitor_info::~win_monitor_info() |
trunk/src/osd/windows/winfile.cpp
| r250192 | r250193 | |
| 20 | 20 | // MAMEOS headers |
| 21 | 21 | #include "strconv.h" |
| 22 | 22 | #include "winutil.h" |
| 23 | | #include "winutf8.h" |
| 24 | 23 | |
| 25 | 24 | #include "winfile.h" |
| 26 | 25 | |
| r250192 | r250193 | |
| 187 | 186 | break; |
| 188 | 187 | case WINFILE_SOCKET: |
| 189 | 188 | return win_read_socket(file, buffer, offset, length, actual); |
| 190 | | break; |
| 191 | 189 | case WINFILE_PTTY: |
| 192 | 190 | return win_read_ptty(file, buffer, offset, length, actual); |
| 193 | | break; |
| 194 | 191 | |
| 195 | 192 | } |
| 196 | 193 | return FILERR_NONE; |
| r250192 | r250193 | |
| 226 | 223 | break; |
| 227 | 224 | case WINFILE_SOCKET: |
| 228 | 225 | return win_write_socket(file, buffer, offset, length, actual); |
| 229 | | break; |
| 230 | 226 | case WINFILE_PTTY: |
| 231 | 227 | return win_write_ptty(file, buffer, offset, length, actual); |
| 232 | | break; |
| 233 | 228 | |
| 234 | 229 | } |
| 235 | 230 | return FILERR_NONE; |
| r250192 | r250193 | |
| 274 | 269 | break; |
| 275 | 270 | case WINFILE_SOCKET: |
| 276 | 271 | return FILERR_FAILURE; |
| 277 | | break; |
| 278 | 272 | case WINFILE_PTTY: |
| 279 | 273 | return FILERR_FAILURE; |
| 280 | | break; |
| 281 | 274 | |
| 282 | 275 | } |
| 283 | 276 | return FILERR_NONE; |