summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/osdcore.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Miscellaneous improvements: Vas Crabb2023-04-141-1/+1
| | | | | | | | | | | | | | infoxml.cpp: Thread device processing. Gives about a 10% speed improvement overall, and avoids the need to mess with the locale of the ultimate output stream. debugger/win/consolewininfo.cpp: Show image mount/create error messages on the console. emu/devdelegate.h, util/delegate.h: Added deduction guides for common delegate creation patterns (only used in sega/segas16a.cpp so far). More noexcept on things that have no business throwing exceptions.
* Various optimisations to code generaton. Vas Crabb2023-03-261-10/+10
| | | | | | | | | | | | | | | util/bitmap.cpp, util/palette.cpp: Marked lots of things constexpr. Bitmaps don't throw exceptions on allocation failure, they just become invalid. Almost nothing in MAME actually checks for this. emu/profiler.cpp: Abort if the profile stack overflows rather than throwing an exception. This is a developer feature and if it overflows, the code is broken. Calling a noreturn noexcept function generates less code than throwing an exception, which adds up. util/strformat.cpp: Traded away some unnecessary flexibility for more compact code. The stream objects must derive from std::basic_ostream now - they can't just be any old objects with the expected operators.
* Patched up some gaps in functionality and fixed some bugs. Vas Crabb2022-09-021-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ui: Added some missing functionality: * Added an option to copy input device IDs to the relevant menus. * Added an item for setting the software lists files path (-hashpath) to the folder setup menu. * Allow pasting text from clipboard in most places that allow typing (searching, entering filenames, entering barcodes). * Changed the software selection menu heading to be a bit less misleading. * Made barcode menu less eager to rebuild itself unnecessarily, and removed some confusing and apparently pointless code. Exposed more Lua bindings: * Added low-level palette objects. * Added indexed bitmap types. * Added a bitmap method for extracting pixels from a rectangular area as a packed binary string. * Changed screen device pixels method to return width and height in addition to the pixels. osd: Added some functionality and cleaned up a little: * Added a function for copying text to the clipboard. * Moved function for converting Windows error codes to standard error conditions to winutil.cpp so it can be used from more places. * Removed duplicate declaration of osd_get_clipboard_text and made the function noexcept (including fixing implementations). * Made macOS implementation of osd_get_clipboard_text skip the encoding conversion if it finds UTF-8 text first. * Changed the default -uimodekey setting so it doesn't lose the "not shift" that stops the default from interfering with UI paste. Various bug fixes: * util/unicode.cpp: Fixed the version of utf8_from_uchar that returns std::string blowing up on invalid codepoints. * util/bitmap.h: Fixed wrapping constructors for indexed bitmaps taking the wrong parameter type (nothing was using them before). * util/bitmap.cpp: Fixed potential use-after-free issues with bitmap palettes. * emu/input.cpp, emu/inputdev.cpp: Log 1-based device numbers, matching what's shown in the internal UI and used in tokens in CFG files. * emu/emumem.cpp: Added the bank tag to a fatal error message where it was missing. docs: Reworked and expanded documentation on configuring stable controller IDs. For translators, the changes are quite minor: * There's a menu item for copying a device ID to the clipboard, and associated success/failure messages. * There's the menu item for setting the software list file search path. * One of the lines in the software selection menu heading has changes as it could be interpreted as implying it showed a software list name.
* OSD/network interface cleanup AJR2022-08-281-23/+0
| | | | | | | - Move osd_midi_device from osdcore.h to osdepend.h - Move osd_list_network_adapters from osdcore.h to osdnet.h (was already defineduniquely in osdnet.cpp) - Move #include <cstdarg> from osdcore.h to emu.h - Remove dinetwork.h from emu.h
* osdcore.h: Changed osd_subst_env to accept a std::string_view and return a ↵ npwoods2022-06-151-2/+1
| | | | std::string. (#9928)
* cpu: Allow recompilers to work with W^X policy Vas Crabb2021-01-061-21/+0
|
* Low-level #include overhaul AJR2021-01-021-373/+0
| | | | | | | - vecstream.h: Revert changes made in aa29519528cb3dbdbfac56819bea670ed8c56c5d. The std::string_view conversion has been made a non-member function (util::buf_to_string_view) and moved to coretmpl.h. - strformat.h: Remove the using declaration importing util::string_format into the global namespace. It has been moved to emucore.h and a few tool sources; other references have been qualified. - osdcore.h: Split out file, directory and path classes and methods to a new header (osdfile.h), Doxygenizing the documentation comments. - Disaggregate many #includes that were including other standard or custom headers. emu.h now includes basically the same things that it did, but other headers have been streamlined; for instance, emucore.h no longer stealth-includes osdcore.h several ways.
* (nw) add doxygen comments for a bunch of core stuff, and convert a bunch of ↵ Vas Crabb2019-10-161-254/+241
| | | | comments to doxygen format
* Make osd_printf_* use util/strformat semantics. Vas Crabb2019-09-261-14/+43
| | | | | | | | | | | | | | | | | (nw) This has been a long time coming but it's here at last. It should be easier now that logerror, popmessage and osd_printf_* behave like string_format and stream_format. Remember the differences from printf: * Any object with a stream out operator works with %s * %d, %i, %o, %x, %X, etc. work out the size by magic * No sign extending promotion to int for short/char * No widening/narrowing conversions for characters/strings * Same rules on all platforms, insulated from C runtime library * No format warnings from compiler * Assert in debug builds if number of arguments doesn't match format (nw) Also removed a pile of redundant c_str and string_format, and some workarounds for not being able to portably format 64-bit integers or long long.
* Changed osd_get_clipboard_text() to return std::string (#5615) npwoods2019-09-111-6/+1
| | | | | | | | | | * Changed osd_get_clipboard_text() to return std::string This change has only been tested on Windows. The Un*x/Mac versions were made blindly; they might not even build. This needs to be checked prior to merging. * Fixing Mac OS X build (hopefully)
* Creating an -attach_window command line parameter on Windows to attach to an ↵ npwoods2019-08-041-0/+3
| | | | | | | | | | | | | | existing window (#5381) * Creating an -attach_window command line parameter on Windows to attach to an existing window * Moved -attach_window option to Windows-specific code * Created an osd_set_aggressive_input_focus() function and exposed to LUA * Created a dummy implementation of osd_set_aggressive_input_focus() for SDL
* -scc68070: Moved Quizard MCU HLE from SCC68070 device to cdi.cpp and ↵ MooglyGuy2019-07-241-0/+151
| | | | converted SCC68070 to use logmacro. [Ryan Holtz]
* Discord plugin try 2 (#3640) cracyc2018-06-081-0/+8
| | | | | | | | | | | * plugins/discord: discord presence plugin [Carl] * plugins/discord: use domain sockets and pipes [Carl] * winptty: fix connecting to existing socket (nw) plugins/discord: show pause state (nw) * plugins/discord: fix pause behavior (nw)
* Attempted to sanitize/rationalize how we access UTF-8 command line arguments ↵ npwoods2017-09-181-0/+4
| | | | | | | | | | | (#2532) Specifically, this creates a call osd_get_command_line() that returns UTF-8 command line arguments as std::vector<std::string>. On non-Windows platforms, this does nothing more than build the vector. On Windows, this invokes GetCommandLineW() and CommandLineToArgvW(). This also attempts to unwind usage of wmain()/_tmain() on Windows, which is not standard. Related to this, this fixes a bug in Imgtool; specifically, non-7 bit ASCII was not being handled correctly in Windows. This is really an admission that the way that Windows handles Unicode and command line arguments sucks, and it is my belief that having a wmain() or _tmain() declaration specific for Windows is a worse solution. C'est la vie. I'm very open to the idea that src/osd/osdcore.[cpp|h] is not the best place to do this. Let me know if I should move it.
* No need for osd_malloc, osd_malloc_array and osd_free (nw) Miodrag Milanovic2016-11-111-53/+0
| | | | MALLOC_DEBUG not applicable anymore since we use new to allocate in 99.9% of cases
* final cleanup of TRUE/FALSE, left only in windows section where it represent ↵ Miodrag Milanovic2016-10-221-7/+7
| | | | BOOL (nw)
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-14/+14
| | | | | Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
* use standard types uintptr_t, char16_t and char32_t instead of FPTR, ↵ Miodrag Milanovic2016-10-221-3/+3
| | | | utf16_char, unicode_char (nw)
* Cleanups and version bump Miodrag Milanovic2016-07-271-10/+10
|
* Create osd_is_valid_filename_char() and osd_is_valid_filepath_char() ↵ Nathan Woods2016-07-051-1/+30
| | | | functions to check to see if a character is legal, and moved retired is_valid_filename_char() in filecreate.cpp. POSIX versions not implemented yet.
* Cleanup and version bumpmame0175 Miodrag Milanovic2016-06-291-10/+10
|
* Revert "This worked by pure luck (nw)" Vas Crabb2016-06-251-4/+0
| | | | This reverts commit b3491464e41b6afea81e188fe6a350d4f778854b.
* This worked by pure luck (nw) Miodrag Milanovic2016-06-241-0/+4
|
* POSIX implementation for new directory read features, cleanup of Windows ↵ Vas Crabb2016-06-251-3/+5
| | | | implementation, return directory handle as smart pointer, fix full build [Vas Crabb]
* Changed osd_stat() to return std::unique_ptr<osd::directory::entry> Nathan Woods2016-06-241-2/+1
|
* C++-ified osd_directory (now osd::directory), and added last_modified to ↵ Nathan Woods2016-06-241-69/+58
| | | | osd::directory::entry
* Various cleanups suggested by static analyzer (nw) Miodrag Milanovic2016-04-241-3/+3
|
* move clipboard handling on proper place (nw) Miodrag Milanovic2016-04-031-5/+0
|
* Make osd_file a polymorphic class that's held with smart pointers Vas Crabb2016-03-141-137/+133
| | | | | | | | | | | | | | | Make avi_file a class that's held with smart pointers, encapsulate various AVI I/O structures Make zip_file and _7z_file classes rather than having free functions everywhere Hide zip/7z class implementation behind an interface, no longer need to call close() to send back to the cache Don't dump as much crap in global namespace Add solaris PTY implementation Improve variable expansion for SDL OSD - supports ~/$FOO/${BAR} syntax Rearrange stuff so the same things are in file module for all OSDs Move file stuff into its own module 7z/zip open and destruct are still not thread-safe due to lack of interlocks around cache access Directory functions still need to be moved to file module SDL OSD may not initialise WinSock on Windows
* Add function for flushing file buffers Vas Crabb2016-03-011-0/+15
|
* OS/2 can not support SDL2 which is needed for MAME to run (nw) Miodrag Milanovic2016-02-261-1/+1
|
* replace osd_lock with std::mutex [Miodrag Milanovic] Miodrag Milanovic2016-01-301-87/+0
|
* common osd path environment var expansion Jeffrey Clark2016-01-061-0/+11
|
* macro removal INLINE -> static inline (nw) Miodrag Milanovic2015-12-121-1/+1
|
* clang-modernize part 1 (nw) Miodrag Milanovic2015-12-031-2/+2
|
* pty: first step of pseudo terminal implementation fulivi2015-10-131-0/+19
| | | | | Conflicts: scripts/src/bus.lua
* Fix creation of paths Vas Crabb2015-03-311-0/+4
|
* First step to move osd_printf_* into osd again. Callbacks are now couriersud2015-03-041-7/+21
| | | | implemented using an interface and use a push/pop approach where the pop can happen out of order of pushes. [Couriersud]
* Converted midi into a module. (nw) couriersud2015-01-311-13/+14
|
* Promote osd_getenv from osdlib.h to osdcore.h. Change return type to couriersud2015-01-271-0/+14
| | | "const char*". Fixes netlist compile.
* Added include of stdarg to support some platforms (nw) Miodrag Milanovic2015-01-111-0/+1
|
* Moved osd midi stuff to osd/modules/midi. Needed to touch a couple of couriersud2015-01-091-0/+2
| | | | other files so that mame compiles and links. Tested SDL build (linux/windows).
* Added -listnetwork option to list available network adapters Miodrag Milanovic2014-10-231-0/+3
|
* -Made osd_interface base class for OSD and moved initialization for each ↵ Miodrag Milanovic2014-04-251-2/+0
| | | | | | | | subsystem in it as virtual calls. (nw) -Moved midi handling in base class -Cleaned running_machine of information of next machine -All is cleaned after exiting of running_machine so debugger window is removed as well till next machine is started -Made osdmini to compile
* Moved eminline and related files into /src/osd since it's system related (nw) Miodrag Milanovic2014-04-161-8/+34
| | | | | | | | Moved delegates into /src/lib/util to enable usage of delegates in other project parts Moved mame_printf_* calls into /src/osd/osdcore.c and renamed them to osd_printf_* Changed mess.mak to display compilation of ymmu100.ppm nicely
* Cleanups and version bumpmame0153 Miodrag Milanovic2014-04-071-1/+1
|
* some comments (nw) Oliver Stöneberg2014-03-241-1/+4
|
* Add an osd_truncate call to truncate files [O. Galibert] Olivier Galibert2014-03-111-0/+17
|
* Bulk convert files that already had standard BSD license in my name Aaron Giles2013-10-161-31/+2
| | | | to new license tagged form.
* First pass on MIDI out support [R. Belmont] R. Belmont2013-01-141-0/+1
|