summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2015-10-28 08:06:12 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2015-10-28 08:06:12 +0100
commit47f56372ee5f2d5eec2793608a5426296857b26a (patch)
tree5cb578501b3dfc70b9af27214d72dd0d881d3bd8 /src/emu
parentf55f3d9624ef703151c81d9d9dae02eb13313076 (diff)
Cleanup and version bumpmame0167
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/dipty.c70
-rw-r--r--src/emu/dipty.h26
-rw-r--r--src/emu/emuopts.c2
-rw-r--r--src/emu/screen.h2
-rw-r--r--src/emu/ui/info_pty.c30
-rw-r--r--src/emu/ui/mainmenu.c12
-rw-r--r--src/emu/ui/mainmenu.h2
-rw-r--r--src/emu/video/vector.c6
8 files changed, 75 insertions, 75 deletions
diff --git a/src/emu/dipty.c b/src/emu/dipty.c
index 1d188f95d0a..f0637abb0fe 100644
--- a/src/emu/dipty.c
+++ b/src/emu/dipty.c
@@ -12,10 +12,10 @@
#include "osdcore.h"
device_pty_interface::device_pty_interface(const machine_config &mconfig, device_t &device)
- : device_interface(device, "pty"),
- m_pty_master(NULL),
- m_slave_name(),
- m_opened(false)
+ : device_interface(device, "pty"),
+ m_pty_master(NULL),
+ m_slave_name(),
+ m_opened(false)
{
}
@@ -25,61 +25,61 @@ device_pty_interface::~device_pty_interface()
bool device_pty_interface::open(void)
{
- if (!m_opened) {
- char buffer[ 128 ];
-
- if (osd_openpty(&m_pty_master , buffer , sizeof(buffer)) == FILERR_NONE) {
- m_opened = true;
- m_slave_name.assign(buffer);
- } else {
- m_opened = false;
- m_pty_master = NULL;
- }
- }
-
- return m_opened;
+ if (!m_opened) {
+ char buffer[ 128 ];
+
+ if (osd_openpty(&m_pty_master , buffer , sizeof(buffer)) == FILERR_NONE) {
+ m_opened = true;
+ m_slave_name.assign(buffer);
+ } else {
+ m_opened = false;
+ m_pty_master = NULL;
+ }
+ }
+
+ return m_opened;
}
void device_pty_interface::close(void)
{
- if (m_opened) {
- osd_close(m_pty_master);
- m_opened = false;
- }
+ if (m_opened) {
+ osd_close(m_pty_master);
+ m_opened = false;
+ }
}
bool device_pty_interface::is_open(void) const
{
- return m_opened;
+ return m_opened;
}
ssize_t device_pty_interface::read(UINT8 *rx_chars , size_t count)
{
- UINT32 actual_bytes;
+ UINT32 actual_bytes;
- if (m_opened && osd_read(m_pty_master, rx_chars, 0, count, &actual_bytes) == FILERR_NONE) {
- return actual_bytes;
- } else {
- return -1;
- }
+ if (m_opened && osd_read(m_pty_master, rx_chars, 0, count, &actual_bytes) == FILERR_NONE) {
+ return actual_bytes;
+ } else {
+ return -1;
+ }
}
void device_pty_interface::write(UINT8 tx_char)
{
- UINT32 actual_bytes;
+ UINT32 actual_bytes;
- if (m_opened) {
- osd_write(m_pty_master, &tx_char, 0, 1, &actual_bytes);
- }
+ if (m_opened) {
+ osd_write(m_pty_master, &tx_char, 0, 1, &actual_bytes);
+ }
}
bool device_pty_interface::is_slave_connected(void) const
{
- // TODO: really check for slave status
- return m_opened;
+ // TODO: really check for slave status
+ return m_opened;
}
const char *device_pty_interface::slave_name(void) const
{
- return m_slave_name.c_str();
+ return m_slave_name.c_str();
}
diff --git a/src/emu/dipty.h b/src/emu/dipty.h
index c381420a0ca..8df192efcca 100644
--- a/src/emu/dipty.h
+++ b/src/emu/dipty.h
@@ -20,26 +20,26 @@
class device_pty_interface : public device_interface
{
public:
- // construction/destruction
- device_pty_interface(const machine_config &mconfig, device_t &device);
- virtual ~device_pty_interface();
+ // construction/destruction
+ device_pty_interface(const machine_config &mconfig, device_t &device);
+ virtual ~device_pty_interface();
- bool open(void);
- void close(void);
+ bool open(void);
+ void close(void);
- bool is_open(void) const;
+ bool is_open(void) const;
- ssize_t read(UINT8 *rx_chars , size_t count);
- void write(UINT8 tx_char);
+ ssize_t read(UINT8 *rx_chars , size_t count);
+ void write(UINT8 tx_char);
- bool is_slave_connected(void) const;
+ bool is_slave_connected(void) const;
- const char *slave_name(void) const;
+ const char *slave_name(void) const;
protected:
- osd_file *m_pty_master;
- std::string m_slave_name;
- bool m_opened;
+ osd_file *m_pty_master;
+ std::string m_slave_name;
+ bool m_opened;
};
// iterator
diff --git a/src/emu/emuopts.c b/src/emu/emuopts.c
index 0a71dd3afe5..a163a7ae65d 100644
--- a/src/emu/emuopts.c
+++ b/src/emu/emuopts.c
@@ -445,7 +445,7 @@ void emu_options::parse_standard_inis(std::string &error_string)
parse_one_ini("computer", OPTION_PRIORITY_SYSTYPE_INI, &error_string);
else if (cursystem->flags & MACHINE_TYPE_OTHER)
parse_one_ini("othersys", OPTION_PRIORITY_SYSTYPE_INI, &error_string);
-
+
machine_config config(*cursystem, *this);
screen_device_iterator iter(config.root_device());
for (const screen_device *device = iter.first(); device != NULL; device = iter.next())
diff --git a/src/emu/screen.h b/src/emu/screen.h
index 095142cf7c7..725160005a2 100644
--- a/src/emu/screen.h
+++ b/src/emu/screen.h
@@ -285,7 +285,7 @@ private:
UINT8 m_curtexture; // current texture index
bool m_changed; // has this bitmap changed?
INT32 m_last_partial_scan; // scanline of last partial update
- INT32 m_partial_scan_hpos; // horizontal pixel last rendered on this partial scanline
+ INT32 m_partial_scan_hpos; // horizontal pixel last rendered on this partial scanline
bitmap_argb32 m_screen_overlay_bitmap; // screen overlay bitmap
UINT32 m_unique_id; // unique id for this screen_device
rgb_t m_color; // render color
diff --git a/src/emu/ui/info_pty.c b/src/emu/ui/info_pty.c
index 1fe865f5668..5a6dca59efb 100644
--- a/src/emu/ui/info_pty.c
+++ b/src/emu/ui/info_pty.c
@@ -13,7 +13,7 @@
#include "ui/info_pty.h"
ui_menu_pty_info::ui_menu_pty_info(running_machine &machine, render_container *container) :
- ui_menu(machine, container)
+ ui_menu(machine, container)
{
}
@@ -23,22 +23,22 @@ ui_menu_pty_info::~ui_menu_pty_info()
void ui_menu_pty_info::populate()
{
- item_append("Pseudo terminals", NULL, MENU_FLAG_DISABLE, NULL);
- item_append("", NULL, MENU_FLAG_DISABLE, NULL);
-
- pty_interface_iterator iter(machine().root_device());
- for (device_pty_interface *pty = iter.first(); pty != NULL; pty = iter.next()) {
- const char *port_name = pty->device().owner()->tag() + 1;
- if (pty->is_open()) {
- item_append(port_name , pty->slave_name() , MENU_FLAG_DISABLE , NULL);
- } else {
- item_append(port_name , "[failed]" , MENU_FLAG_DISABLE , NULL);
- }
- item_append("", NULL, MENU_FLAG_DISABLE, NULL);
- }
+ item_append("Pseudo terminals", NULL, MENU_FLAG_DISABLE, NULL);
+ item_append("", NULL, MENU_FLAG_DISABLE, NULL);
+
+ pty_interface_iterator iter(machine().root_device());
+ for (device_pty_interface *pty = iter.first(); pty != NULL; pty = iter.next()) {
+ const char *port_name = pty->device().owner()->tag() + 1;
+ if (pty->is_open()) {
+ item_append(port_name , pty->slave_name() , MENU_FLAG_DISABLE , NULL);
+ } else {
+ item_append(port_name , "[failed]" , MENU_FLAG_DISABLE , NULL);
+ }
+ item_append("", NULL, MENU_FLAG_DISABLE, NULL);
+ }
}
void ui_menu_pty_info::handle()
{
- process(0);
+ process(0);
}
diff --git a/src/emu/ui/mainmenu.c b/src/emu/ui/mainmenu.c
index 196fdb976c2..27d224678ce 100644
--- a/src/emu/ui/mainmenu.c
+++ b/src/emu/ui/mainmenu.c
@@ -91,10 +91,10 @@ void ui_menu_main::populate()
item_append("Tape Control", NULL, 0, (void *)TAPE_CONTROL);
}
- pty_interface_iterator ptyiter(machine().root_device());
- if (ptyiter.first() != NULL) {
- item_append("Pseudo terminals", NULL, 0, (void *)PTY_INFO);
- }
+ pty_interface_iterator ptyiter(machine().root_device());
+ if (ptyiter.first() != NULL) {
+ item_append("Pseudo terminals", NULL, 0, (void *)PTY_INFO);
+ }
if (machine().ioport().has_bioses())
item_append("Bios Selection", NULL, 0, (void *)BIOS_SELECTION);
@@ -196,8 +196,8 @@ void ui_menu_main::handle()
ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_tape_control(machine(), container, NULL)));
break;
- case PTY_INFO:
- ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_pty_info(machine(), container)));
+ case PTY_INFO:
+ ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_pty_info(machine(), container)));
break;
case SLOT_DEVICES:
diff --git a/src/emu/ui/mainmenu.h b/src/emu/ui/mainmenu.h
index b35a5927073..aa1f3a99885 100644
--- a/src/emu/ui/mainmenu.h
+++ b/src/emu/ui/mainmenu.h
@@ -45,7 +45,7 @@ private:
SELECT_GAME,
BIOS_SELECTION,
BARCODE_READ,
- PTY_INFO
+ PTY_INFO
};
};
diff --git a/src/emu/video/vector.c b/src/emu/video/vector.c
index f0146234afe..720e24bd049 100644
--- a/src/emu/video/vector.c
+++ b/src/emu/video/vector.c
@@ -227,12 +227,12 @@ void vector_device::add_point(int x, int y, rgb_t color, int intensity)
if (m_flicker && (intensity > 0))
{
float random = (float)(machine().rand() & 255) / 255.0f; // random value between 0.0 and 1.0
-
+
intensity -= (int)(intensity * random * m_flicker);
if (intensity < 0)
{
intensity = 0;
- }
+ }
if (intensity > 255)
{
intensity = 255;
@@ -344,7 +344,7 @@ UINT32 vector_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
coords.y1 = ((float)curpoint->y - yoffs) * yscale;
// extend zero-length vector line (vector point) by quarter beam_width on both sides
- if (fabs(coords.x0 - coords.x1) < FLT_EPSILON &&
+ if (fabs(coords.x0 - coords.x1) < FLT_EPSILON &&
fabs(coords.y0 - coords.y1) < FLT_EPSILON)
{
coords.x0 += xratio * beam_width * 0.25f;