Small cleanup (nw)

This commit is contained in:
Miodrag Milanovic 2016-11-11 16:11:28 +01:00
parent 7c765ea147
commit 0d87fd7cb8
19 changed files with 33 additions and 28 deletions

View File

@ -286,7 +286,7 @@ bool consolewin_info::handle_command(WPARAM wparam, LPARAM lparam)
return true;
case DEVOPTION_CLOSE:
img->unload();
return 1;
return true;
}
if (img->device().type() == CASSETTE)
{

View File

@ -348,7 +348,7 @@ public:
{
}
virtual ~osd_font_dwrite() { close(); }
virtual ~osd_font_dwrite() { osd_font_dwrite::close(); }
virtual bool open(std::string const &font_path, std::string const &_name, int &height) override
{

View File

@ -134,7 +134,7 @@ public:
HRESULT enum_attached_devices(int devclass, device_enum_interface *enumerate_interface, void *state) const;
const std::string guid_to_string(const GUID& guid)
std::string guid_to_string(const GUID& guid) const
{
char guid_string[37];
sprintf_s(

View File

@ -342,7 +342,7 @@ void osd_common_t::register_options()
update_option(OSDOPTION_VIDEO, m_video_names);
}
void osd_common_t::update_option(const char * key, std::vector<const char *> &values)
void osd_common_t::update_option(const char * key, std::vector<const char *> &values) const
{
std::string current_value(m_options.description(key));
std::string new_option_value("");
@ -625,8 +625,7 @@ bool osd_common_t::execute_command(const char *command)
static void output_notifier_callback(const char *outname, int32_t value, void *param)
{
osd_common_t *osd = (osd_common_t*)param;
osd->notify(outname, value);
static_cast<osd_common_t*>(param)->notify(outname, value);
}
void osd_common_t::init_subsystems()

View File

@ -257,7 +257,7 @@ private:
osd_module_manager m_mod_man;
font_module *m_font_module;
void update_option(const char * key, std::vector<const char *> &values);
void update_option(const char * key, std::vector<const char *> &values) const;
// FIXME: should be elsewhere
osd_module *select_module_options(const core_options &opts, const std::string &opt_name)
{

View File

@ -4,6 +4,8 @@
* monitor_common.h
*
*/
#ifndef __MONITOR_COMMON_H__
#define __MONITOR_COMMON_H__
#include "modules/lib/osdobj_common.h"
#include <map>
@ -41,3 +43,5 @@ private:
std::shared_ptr<osd_monitor_info> pick_monitor_internal(osd_options& options, int index);
static float get_aspect(const char *defdata, const char *data, int report_error);
};
#endif

View File

@ -41,9 +41,12 @@ class pcap_module : public osd_module, public netdev_module
{
public:
pcap_module()
: osd_module(OSD_NETDEV_PROVIDER, "pcap"), netdev_module()
: osd_module(OSD_NETDEV_PROVIDER, "pcap"), netdev_module(),
pcap_findalldevs_dl(nullptr), pcap_open_live_dl(nullptr), pcap_next_ex_dl(nullptr), pcap_compile_dl(nullptr),
pcap_close_dl(nullptr), pcap_setfilter_dl(nullptr), pcap_sendpacket_dl(nullptr), pcap_set_datalink_dl(nullptr), pcap_dispatch_dl(nullptr)
{
}
virtual ~pcap_module() { }
virtual int init(const osd_options &options) override;

View File

@ -71,7 +71,7 @@ class osd_window : public std::enable_shared_from_this<osd_window>
public:
osd_window(const osd_window_config &config)
:
#ifdef OSD_WINDOW
#ifdef OSD_WINDOWS
m_dc(nullptr), m_resize_state(0),
#endif
m_primlist(nullptr),
@ -83,6 +83,8 @@ public:
m_main(nullptr)
{}
virtual ~osd_window() { }
virtual render_target *target() = 0;
virtual int fullscreen() const = 0;
virtual running_machine &machine() const = 0;

View File

@ -67,7 +67,7 @@ class output_win32 : public osd_module, public output_module
{
public:
output_win32()
: osd_module(OSD_OUTPUT_PROVIDER, "windows"), output_module()
: osd_module(OSD_OUTPUT_PROVIDER, "windows"), output_module(), m_output_hwnd(nullptr), m_clientlist(nullptr)
{
}
virtual ~output_win32() { }

View File

@ -165,13 +165,13 @@ private:
shaders::shaders() :
d3dintf(nullptr), machine(nullptr), d3d(nullptr), post_fx_enable(false), oversampling_enable(false),
num_screens(0), curr_screen(0), shadow_texture(nullptr), options(nullptr), black_surface(nullptr),
black_texture(nullptr), recording_movie(false),render_snap(false), snap_copy_target(nullptr),
black_texture(nullptr), recording_movie(false), render_snap(false), snap_copy_target(nullptr),
snap_copy_texture(nullptr), snap_target(nullptr), snap_texture(nullptr), snap_width(0), snap_height(0),
initialized(false), backbuffer(nullptr), curr_effect(nullptr), default_effect(nullptr),
prescale_effect(nullptr), post_effect(nullptr), distortion_effect(nullptr), focus_effect(nullptr),
phosphor_effect(nullptr), deconverge_effect(nullptr), color_effect(nullptr), ntsc_effect(nullptr),
bloom_effect(nullptr), downsample_effect(nullptr), vector_effect(nullptr), curr_texture(nullptr),
curr_render_target(nullptr), curr_poly(nullptr)
curr_render_target(nullptr), curr_poly(nullptr), d3dx_create_effect_from_file_ptr(nullptr)
{
}

View File

@ -6,14 +6,11 @@
//
//============================================================
// MAMEOS headers
#include "window.h"
#pragma once
#ifndef __DRAWNONE__
#define __DRAWNONE__
#include "window.h"
class renderer_none : public osd_renderer
{
public:

View File

@ -1,10 +1,10 @@
// license:BSD-3-Clause
// copyright-holders:Carl
#include "emu.h"
#ifndef __OSDNET_H__
#define __OSDNET_H__
#include "emu.h"
class osd_netdev;
#define CREATE_NETDEV(name) class osd_netdev *name(const char *ifname, class device_network_interface *ifdev, int rate)

View File

@ -104,7 +104,7 @@ void windows_osd_interface::update(bool skip_redraw)
}
// poll the joystick values here
winwindow_process_events(machine(), TRUE, FALSE);
winwindow_process_events(machine(), true, false);
poll_input(machine());
check_osd_inputs();
// if we're running, disable some parts of the debugger

View File

@ -314,7 +314,7 @@ void winwindow_process_events_periodic(running_machine &machine)
// update once every 1/8th of a second
if (currticks - last_event_check < std::chrono::milliseconds(1000 / 8))
return;
winwindow_process_events(machine, TRUE, false);
winwindow_process_events(machine, true, false);
}
//============================================================
@ -359,7 +359,7 @@ inline static BOOL handle_keypress(windows_osd_interface *osd, int vkey, int dow
// (main thread)
//============================================================
void winwindow_process_events(running_machine &machine, int ingame, bool nodispatch)
void winwindow_process_events(running_machine &machine, bool ingame, bool nodispatch)
{
// MSG message;

View File

@ -157,7 +157,7 @@ struct osd_draw_callbacks
//============================================================
BOOL winwindow_has_focus(void);
void winwindow_process_events(running_machine &machine, int ingame, bool nodispatch);
void winwindow_process_events(running_machine &machine, bool ingame, bool nodispatch);
void winwindow_process_events_periodic(running_machine &machine);
//============================================================

View File

@ -97,7 +97,7 @@ void windows_osd_interface::update(bool skip_redraw)
}
// poll the joystick values here
winwindow_process_events(machine(), TRUE, FALSE);
winwindow_process_events(machine(), true, false);
poll_input(machine());
check_osd_inputs();
// if we're running, disable some parts of the debugger

View File

@ -411,7 +411,7 @@ void winwindow_process_events_periodic(running_machine &machine)
// update once every 1/8th of a second
if (currticks - last_event_check < std::chrono::milliseconds(1000 / 8))
return;
winwindow_process_events(machine, TRUE, false);
winwindow_process_events(machine, true, false);
}
@ -460,7 +460,7 @@ inline static BOOL handle_keypress(windows_osd_interface *osd, int vkey, int dow
// (main thread)
//============================================================
void winwindow_process_events(running_machine &machine, int ingame, bool nodispatch)
void winwindow_process_events(running_machine &machine, bool ingame, bool nodispatch)
{
MSG message;

View File

@ -169,7 +169,7 @@ void winwindow_take_video(void);
void winwindow_toggle_fsfx(void);
void winwindow_process_events_periodic(running_machine &machine);
void winwindow_process_events(running_machine &machine, int ingame, bool nodispatch);
void winwindow_process_events(running_machine &machine, bool ingame, bool nodispatch);
void winwindow_ui_pause(running_machine &machine, int pause);
int winwindow_ui_is_paused(running_machine &machine);

View File

@ -589,7 +589,7 @@ void windows_osd_interface::osd_exit()
#endif
// one last pass at events
winwindow_process_events(machine(), 0, 0);
winwindow_process_events(machine(), false, false);
}