summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/osdcore.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Various optimisations to code generaton. Vas Crabb2023-03-261-8/+8
| | | | | | | | | | | | | | | 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.
* Removed local copy of SDL source and update Android build support. (#10899) Miodrag Milanović2023-02-271-5/+5
| | | | | | | | | * Removed SDL2 source. * Updated gradle. * Updated SDL2 Java support glue code. * Increased minimum supported Android API version to 24. * Updated required asset files for Android app. * Added proper tag for Android logging. * Added SDL2 hint to make BGFX work on Android.
* osdcore: fix buffer overflow with osd_output stack hap2021-10-301-2/+2
|
* -ui: Made zoom controls a bit more intuitive. Vas Crabb2021-09-061-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * The UI controls are described as zoom in/out, but they had the opposite effect on the palette and tile viewers. That has been changed to make them consistent with the tilemap viewer. * Made the default zoom key not act as a toggle. People are familiar with the function of Ctrl+0/=/- in web browsers, so making them behave similarly in MAME should make it more approachable. Also added the default zoom key to the relevant documentation page. * Implemented the default zoom key for the palette and tile viewers. * In the tilemap viewer, if the view is in default expand to fit mode, zoom in/out starting from the actual zoom ratio. Once again, this behaves more like the zoom controls in a web browser displaying an image so it should be more intuitive. * Made more messages from the tilemap viewer localisable. -util/zippath.cpp: Fixed MT08074. * There were multiple issues at play here. After #8443 was applied, is_root was simply never returning true on Windows, as OSD_WINDOWS isn't actually defined outside libosd and libocore. This caused phantom parent items to appear in disk roots on Windows, but it meant that the check in zippath_resolve would always fail so the trailing backslash would be trimmed. Fixing the macro test in is_root meant the trailing backslash from C:\ would no longer be trimmed, which caused the stat in zippath_resolve to fail. -bigbord2.cpp: Hooked up floppy DRQ that had somehow got lost. -Reduced tag map lookups in several drivers and devices. -util/coretmpl.h: Removed an overload of bitswap that can be avoided using if constexpr. -Added doxygen comments to some classes, and fixed several doxygen warnings. -util, osd: Test for _WIN32 rather than WIN32. * In C++17 mode, WIN32 is no longer a predefined macro, although various things in 3rdparty define it to maintain legacy support. We're better off moving forward anyway for when WIN32 disappears entirely. (WIN32 is not a reserved name, while _WIN32 is, starting with an underscore follwed by an uppercase letter.)
* Use log write calls directy on android Miodrag Milanovic2021-08-171-6/+6
|
* video/voodoo.cpp: Major rewrite: (#8267) Aaron Giles2021-07-091-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Changed to use modern poly.h instead of polylgcy.h. * Moved helper classes into separate voodoo namespace. * Derived device classes from video_device_interface. * Split classes so that later versions derive from earlier versions. * Created device maps to be directly included. * Redesigned register mapping to use helper classes and delegates. * Rewrote rasterizers to use C++ templates instead of macros. * Added logic to compute equations for color/texture combine units. * Added special generic identity-texel rasterizer cases. * Removed pipeline stalls on texture and palette changes. * Removed pipeline stalls on most all parameter changes. * Generally re-thought and cleaned up logic throughout. * Parameterized cycle stealing on status reads; updated all existing voodoo consumers to configure it as it was before. -vidoe/poly.h: Various improvements: * Exposed poly_array class for broader use. * Changed poly_array to intelligently determine maximum size. * Added logic to track multiple "last" instances in poly_array. * Extended logic to support up to 16m work items. * Removed MaxPolys parameter from poly_manager template. * Added Flags parameter to poly_manager template. * Added POLY_FLAG_NO_CLIPPING flag to remove clipping code when not needed. * poly_manager now supports a MaxParams value of 0. * Made paramcount a template parameter for render_* functions. * Added reset_after_wait() method to be overridden by derived classes. * Switched to using std:: helpers instead of internal methods. * Removed useless dependency on screen_device. * TRACK_POLY_WAITS now produces more complete statistics. -video/polylgcy.cpp: Removed legacy implementation of polygon renderer. -machine/gt64xxx.cpp: Prevent lockups by disallowing 0-duration timers. -machine/pci.cpp: Added support for adding subdevice maps directly. -emu/video/rgbsse.h: Improved min/max for SSE4.1+ and scale+clamp operations for all. -emu/vidoe/rgbutil.h: Made palette expansion constexpr and added argbexpand function. -osd/osdcore.cpp: Changed osd_ticks to use QueryPerformanceCounter on Windows since the mingw std::chrono::high_resolution_clock is anything but.
* fixed some clang-tidy warnings (nw) (#6236) Oliver Stöneberg2020-01-301-2/+2
| | | | | | | | | | | | | | | | * fixed some modernize-redundant-void-arg clang-tidy warnings (nw) * fixed some modernize-use-bool-literals clang-tidy warnings (nw) * fixed some modernize-use-emplace clang-tidy warnings (nw) * fixed some performance-move-const-arg clang-tidy warnings (nw) * fixed some readability-redundant-control-flow clang-tidy warnings (nw) * fixed some readability-redundant-string-cstr clang-tidy warnings (nw) * fixed some performance-unnecessary-value-param clang-tidy warnings (nw)
* use C++ library includes (nw) firewave2020-01-221-1/+1
|
* Make osd_printf_* use util/strformat semantics. Vas Crabb2019-09-261-62/+20
| | | | | | | | | | | | | | | | | (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.
* (nw) possible fix for MT 07275 [hap] Robbbert2019-04-191-0/+5
|
* (nw) srcclean - please use UTF-8 for source files, stuff that isn't valid ↵ Vas Crabb2017-09-241-3/+3
| | | | UTF-8 will be nuked, and cleaning it up by hand is annoying
* Attempted to sanitize/rationalize how we access UTF-8 command line arguments ↵ npwoods2017-09-181-0/+48
| | | | | | | | | | | (#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.
* Cleanups and version bumpmame0173 Miodrag Milanovic2016-04-271-6/+5
|
* moved osdsync to root of OSD, removed osdmini (nw) Miodrag Milanovic2016-04-151-9/+0
|
* Fixed joystick on Android preventing application to crash, cleanup init for ↵ Miodrag Milanovic2016-04-021-0/+23
| | | | SDL in total (nw)
* these are constexpr so calculation does not cost (nw) Miodrag Milanovic2016-03-031-1/+1
|
* use chrono calls for time handling in core (nw) Miodrag Milanovic2016-03-031-0/+40
|
* Allow mame -validate -verbose to capture verbose messages AJR2016-01-021-6/+0
|
* clang-modernize part 5 Miodrag Milanovic2015-12-041-1/+1
|
* Rename *.c -> *.cpp in our source (nw) Miodrag Milanovic2015-11-081-0/+149