summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/font/font_dwrite.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Various input and OSD refactoring: Vas Crabb2023-01-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | osd: Supply OSD object to modules on initialisation. Encapsulated some event handling in the OSD objects rather than leaving it in free functions. Put various stuff in namespaces. osd/modules/input: Enabled dinput, xinput and winhybrid modules for Windows SDL builds, and enabled background input for dinput and xinput (and by extension winhybrid) modules. Also fixed some COM and X11 resource leaks. osd/modules/input/input_sdl.cpp: Flipped SDL mouse button order to match Windows, and exposed vertical and horizontal scroll as Z and rZ axes. Moved SDL UI event handling out of input devices into OSD object. osd/modules/input_rawinput.cpp: Changed lightgun Z axis token so it's correctly identified as a relative axis (it maps to the scroll wheel equivalent). osd: Added an option to choose the network provider module. Mostly useful if you build with both TUN/TAP and pcap support included, or if you want to disable emulated networking completely. emu/input.cpp: Use a better strategy for assembling input code names that uses fewer temporary strings and doesn't require use of the non-Unicode-aware space trimming function (fixes MT08552). osd/modules/input_dinput.cpp: Improved polling logic. osd: Made various parts of the input code less dependent on concrete emu objects, and reduced inappropriately passing around the machine object. Made input modules less dependent on OSD implementation. Encapsulated some stuff and got rid of some vestigial newui and SDL1 support code. Cleaned up some interfaces. Moved OSD options classes to their own files. Prepare to remove main.h from emu.h - it's mostly used to get the application name, which the vast majority of emulated devices don't need to do.
* Miscellaneous fixes and refactoring: Vas Crabb2023-01-281-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ui/analogipt.cpp: Fixed bar graph display for fields with ranges that wrap through zero. emu/inputdev.cpp: Separateed analog axis deadzone and switch threshold settings, reduced default deadzone, and fixed a potential division by zero if the deadzone and saturation settings are equal. emu/ioport.cpp: Fixed behaviour of absolute analog fields where range passes through zero - it previously only worked for specific combinations of mask, minimum and default. Removed a workaround from universal/getaway.cpp that is no longer necessary. emu/input.cpp: Fixed unintuitive behaviour when an absolute field is assigned an OR combination of a relative control folled by an absolute control (e.g. Mouse X or Joy 1 LSX). Also fixed reading axis input sequences where an axis code is followed by a switch code (these can only be produced by manually editing configuration files, not through MAME's UI), and fixed the returned type when multiple relative axes sum to zero. osd/modules/input_dinput.cpp: Fixed hat switches being stuck in up position when input is suspended in the background taito/taitoio_yoke.cpp: Give throttle control a distinct type, and don't auto-centre. osd: Added option to select MIDI provider module (currently only PortMidi and the dummy module are available). Also put various things in namespaces, and fixed builds including SDL sound module with native Windows OSD. emu/validity.cpp: Added check to catch I/O port fields using UI input types. emu/inpttype.ipp: Renamed inputs that were causing confusion. "Bill" and "Track" were causing confusion for translators and hence likely causing confusion for many users, especially those who are not native English speakers. "Track" as an abbreviation for "Trackball" was frequently being mistranslated, e.g. in the sense of a CD track selection button or even in the sense of a railway track. There's no reason to abbreviate it. "Bill" in the US English sense as a banknote is too ambiguous and was causing confusion for translators. It's better to use the less ambiguous "Banknote". Corrected Greek translations of "Trackball". Don't run GitHub Actions on issue template changes.
* Patched up some gaps in functionality and fixed some bugs. Vas Crabb2022-09-021-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Clean up #includes in src/osd (#10029) ajrhacker2022-07-041-2/+5
| | | | | * Clean up #includes in src/osd * render/bgfx/view.cpp: Add license header
* Remove OSD_UWP from rest of code Miodrag Milanovic2021-10-261-5/+1
|
* Cleaned up bitmap API. Vas Crabb2020-09-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made const-qualified pixel accessors (pix, pixt, raw_pixptr) return const-qualified references/pointers to pixesl, and added non-const versions. This makes bitmap more like standard library containers where const protects the content as well as the dimensions. Made the templated pixt accessor protected - having it public makes it too easy to inadvertently get a pointer to the wrong location. Removed the pix(8|16|32|64) accessors from the specific bitmaps. You could only use the "correct" one anyway, and having the "incorrect" ones available prevented explicit instantiations of the class template because the static assertions would fail. You can still see the pixel type in the bitmap class names, and you can't assign the result of &pix(y, x) to the wrong kind of pointer without a cast. Added fill member functions to the specific bitmap template, and added a explicit instantiations. This allows the bitmap size check to be skipped on most bitmap fills, although the clipping check is still there. Also fixed a couple of places that were trying to fill an indexed 16-bit bitmap with rgb_t::black() exposed by this (replaced with zero to get the same net effect). The explicit template instantiations in the .cpp file mean the compiler can inline the function if necessary, but don't need to generate a local out-of-line body if it chooses not to. Extended the size of the fill value parameter in the base bitmap class to 64 bits so it works correctly for 64-bit bitmaps. Fixed places where IE15 and VGM visualiser weren't accounting for row bytes potentially being larger than width. Fixed an off-by-one in an HP-DIO card where it was treating the Topcat cursor right edge as exclusive. Updated everything to work with the API changes, reduced the scope of many variables, added more const, and replaced a few fill/copy loops with stuff from <algorithm>.
* fixed some clang-tidy warnings (nw) (#6197) Oliver Stöneberg2020-01-221-1/+1
| | | | | | | | | | | | | | * fixed some bugprone-throw-keyword-missing clang-tidy warnings (nw) * fixed some modernize-use-nullptr clang-tidy warnings (nw) * fixed some readability-delete-null-pointer clang-tidy warnings (nw) * fixed some performance-faster-string-find clang-tidy warnings (nw) * fixed some performance-for-range-copy clang-tidy warnings (nw) * fixed some readability-redundant-string-cstr clang-tidy warnings (nw)
* Make osd_printf_* use util/strformat semantics. Vas Crabb2019-09-261-1/+1
| | | | | | | | | | | | | | | | | (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.
* dwrite: noticed an error msg with missing \n (nw) hap2018-12-141-1/+1
|
* Move special windows.h include directives to build defines (nw) Brad Hughes2016-12-281-1/+0
|
* first srcclean pass (nw) Vas Crabb2016-12-251-1/+1
|
* Merge pull request #1749 from bradhugh/dynamic_api Vas Crabb2016-12-021-41/+21
|\ | | | | Created DYNAMIC_API macros for dynamic bind helper classes
| * Update name of DYNAMIC_API macros (nw) Brad Hughes2016-12-011-20/+20
| |
| * Simpler low-cost implementation making modules and function pointers class ↵ Brad Hughes2016-11-211-23/+21
| | | | | | | | members instead (nw)
| * Changing singleton to be thread safe (nw) Brad Hughes2016-11-201-3/+3
| |
| * Update dwrite debugging functions with DYNAMIC_API (nw) Brad Hughes2016-11-201-9/+3
| |
| * Update DirectWrite font provider to use DYNAMIC_API (nw) Brad Hughes2016-11-201-31/+19
| |
* | srcclean (nw) Vas Crabb2016-11-271-1/+1
|/
* UWP: Different default font. Tahoma not available on XBOX (nw) Brad Hughes2016-11-141-1/+6
|
* Small cleanup (nw) Miodrag Milanovic2016-11-111-1/+1
|
* simplified memory allocation for osd_module (nw) Miodrag Milanovic2016-11-111-0/+2
|
* More UWP work - the UI actually renders (nw) Brad Hughes2016-11-101-2/+2
|
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-18/+18
| | | | | 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-1/+1
| | | | utf16_char, unicode_char (nw)
* Bulk renaming of Windows string conversion functions Nathan Woods2016-10-031-2/+2
| | | | | utf8_from_[a|w|t]string ==> osd::text::from_[a|w|t]string [a|w|t]string_from_utf8 ==> osd::text::to_[a|w|t]string
* Fix compile for DirectWrite font provider and make it compile with normal ↵ Brad Hughes2016-09-161-39/+42
| | | | windows build
* Cleanup and version bumpmame0175 Miodrag Milanovic2016-06-291-1/+1
|
* Add WINAPI to other needed functions for stdcall calling convention on 32-bit Brad Hughes2016-06-151-1/+1
|
* The calling convention goes inside the brackets of pointers to functions. ↵ smf-2016-06-151-1/+1
| | | | | | | | | | | | | Allows compiling with MSVC (nw) Revision: 58dc78b6eba373d88fe7ef68f9ce3c2c43e635d6 Author: Giuseppe Gorgoglione <gorgogsp@gmail.com> Date: 28/05/2016 03:14:15 Message: Introduce dynamic_module This is a central cross-platform facility to dynamically bind functions from shared libraries. Updated all OSD modules to use it.
* Introduce dynamic_module Giuseppe Gorgoglione2016-06-111-23/+30
| | | | | This is a central cross-platform facility to dynamically bind functions from shared libraries. Updated all OSD modules to use it.
* Fix debugging code in font_dwrite.cpp Giuseppe Gorgoglione2016-06-111-21/+25
| | | | Debugging code was disabled by default so compilation errors were overlooked.
* Various cleanups suggested by static analyzer (nw) Miodrag Milanovic2016-04-241-8/+8
|
* fix cross compile (nw) Jeffrey Clark2016-04-031-1/+1
|
* Cleanups and version bump Miodrag Milanovic2016-03-301-19/+19
|
* DirectWrite font enumeration support Brad Hughes2016-03-171-32/+114
|
* Move font enumeration to OSD, separate font name from display name as needed ↵ Vas Crabb2016-03-171-6/+11
| | | | for OSX
* Add module probe support for directwrite so we can fall back cleanly. Brad Hughes2016-03-031-0/+12
|
* Fix DirectWrite font module init error handling Brad Hughes2016-03-021-2/+9
|
* Add DirectWrite font support module Brad Hughes2016-03-021-0/+708