summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/src/osd/sdl.lua
Commit message (Collapse)AuthorAgeFilesLines
* -cpu/e132xs.cpp: Improved exception emulation: Vas Crabb2025-04-011-0/+2
| | | | | | | | | | * Fixed behaviour of exceptions in delay slots, and fixed recompiler not updating ILC and P for some exceptions. * Implemented privilege error exception on setting L in user mode for interpreter. -emu/debug, osd/modules/debugger: Added an option to show exceptionpoints in breakpoints windows.
* Cherry-pick wayland improvements from upstream bgfx (#13070) Julian Sikorski2025-01-021-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Properly support Wayland under EGL and Vulkan. (#3358) * Dynamically load libwayland-egl.so.1 when dealing with Wayland to remove dependencies at program startup. (#3359) * Cleanup. * Support both X11 and Wayland in the same build. (#3360) * Support both X11 and Wayland in the same build. - Works for both Vulkan and OpenGL. - Remove --with-wayland from genie options. - Vulkan loads all three extensions for surface creation instead of only one. - Add width and height parameter to GlContext::createSwapChain(), which is needed for EGL to create a SwapChain with the given window size. - Dirty-fix the example-22-windows to recreate the FrameBuffer by first destroying and then recreating to make sure the window is released of its swapchain. - Fix dbgText glitch in example-22-windows. - Remove old X11-related dependencies for GLFW3. * Formatting. * Adapt to latest bgfx wayland code * Cleanup. * Fix Vulkan swapchain invalidation issue. (#3379) * Fix Vulkan swapchain invalidation issue. * Always clamp render pass to frame buffer size. * Fix formatting. * Hopefully fix macOS build * Hopefully fix macOS build, attempt 2 --------- Co-authored-by: Martijn Courteaux <courteauxmartijn@gmail.com> Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
* macOS: Xcode 15 requires explicitly setting -rpath to find the SDL ↵ arbee2023-10-011-0/+1
| | | | framework. [R. Belmont, Carbon]
* render/drawbgfx.cpp: Added initial support for Wayland on Linux. (#11451) Julian Sikorski2023-09-291-0/+15
|
* Removed local copy of SDL source and update Android build support. (#10899) Miodrag Milanović2023-02-271-80/+28
| | | | | | | | | * 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.
* osd: Turned video modules into actual modules, fixed various issues. Vas Crabb2023-02-011-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't ignore the return status of OSD module initialisation. Attempt to fall back to an alternate module if the selected module fails to initialise. Log more useful diagnostic information at verbose level. Fixed BGFX crash on exit after toggling fullscreen. Also persist more settings than just the selected chains across toggling fullscreen. Turned video modules into OSD modules in the same sense as all the other OSD modules. They now use the same selection/fallback mechanism as all the other modules without special extra code in the OSD implementations. Untangled some object ownership mess. Windows own renderers, OSD objects own windows. Fixed a refrence loop that caused the first window object to always leak. Don't create renderer object until after underlying window has been created. Fixed issues with order of creation/destruction when toggling fullscreen or changing prescale in fullscreen with -switchres in SDL builds. Use more smart pointers in BGFX and Direct3D render modules. Most of the code now reutrns a smart pointer when handing over ownership or a naked pointer when retaining ownership. Fixed a few leaks and simplified cleanup code. Encapsulated various OSD modules better.
* Various input and OSD refactoring: Vas Crabb2023-01-291-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Update BGFX, BX and BIMG (#10789) Miodrag Milanović2023-01-051-0/+1
| | | | * Update to bgfx a93a714632b79b5ddbf5c86ac323fa9b76ed3433 Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
* Patched up some gaps in functionality and fixed some bugs. Vas Crabb2022-09-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove OSD_UWP from rest of code Miodrag Milanovic2021-10-261-6/+0
|
* Add new files to SDL OSD as well as Mac OSD. Vas Crabb2021-10-181-0/+2
|
* formats, osd, util: Started refactoring file I/O stuff. (#8456) Vas Crabb2021-08-221-1/+0
| | | | | | | | | Added more modern generic I/O interfaces with implementation backed by stdio, osd_file and core_file, replacing io_generic. Also replaced core_file's build-in zlib compression with a filter. unzip.cpp, un7z.cpp: Added option to supply abstract I/O interface rather than filename. Converted osd_file, core_file, archive_file, chd_file and device_image_interface to use std::error_condition rather than their own error enums. Allow mounting TI-99 RPK from inside archives.
* Low-level #include overhaul AJR2021-01-021-0/+1
| | | | | | | - 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.
* Add AudioToolbox framework when building SDL2 on macOS, fixes TOOLS=1 link ↵ arbee2020-12-131-0/+1
| | | | errors [R. Belmont]
* Removed winpcap and cleaned up network module selection. Vas Crabb2020-03-051-5/+0
| | | | | | | | (nw) The pcap.h header itself has the problematic original BSD license, including the obnoxious advertising clause. Using tap/tun networking on Windows provides a much better experience, so the extra setup is worth it. This patch also allows you to enable pcap on platforms where it's disabled by default with USE_PCAP=1 if you really want to use it.
* Odroid n2 build fixes (#5751) Julian Sikorski2019-10-181-0/+6
| | | | | | | | | | | | * Allow specifying NO_OPENGL manually * Switch bgfx to OpenGL ES renderer if NO_X11 is specified * Only link against EGL when NO_X11 is specified on linux, netbsd and openbsd * Only switch bgfx to OpenGL ES on linux, netbsd and openbsd * Indentation fix
* asmjs: avoid explicitly linking SDL2_ttf. 68bit2019-08-281-1/+1
| | | | | | It appears that it is sufficient to include `-s USE_SDL_TTF=2`, and emcc links in the SDL2_tff library, and it does not like attempts to link this twice.
* asmjs: can not ignore errors on missing libraries 68bit2019-08-281-1/+1
| | | | | | | | | | The current Emscripten release is not happy with the use of "-s ERROR_ON_MISSING_LIBRARIES=0" as a link option, it gives an error stating that all libraries must now be present, so remove that use. This leaves a missing 'util' library. This did not appear to be needed on the few builds I have tried, and this patch avoids adding this library for asmjs.
* Disable WII Lightgun hack by default (#5056) Kiall Mac Innes2019-05-141-0/+13
|
* Enable Xinput by default Kiall Mac Innes2019-04-211-1/+5
| | | | | | | On Linux, enable Xinput support by default. The Xinput lightgun driver is the only reliable+accurate method to use lightguns on Linux, we should enable this by default to reduce the friction for Linux Lightgun users. This should have no effect on users of Windows/Mac etc.
* (nw) Clean up the mess on master Vas Crabb2019-03-261-10/+10
| | | | | | | | | | | | | This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. Before pushing, please check that what you're about to push is sane. Check your local commit log and ensure there isn't anything out-of-place before pushing to mainline. When things like this happen, it wastes everyone's time. I really don't need this in a week when real work™ is busting my balls and I'm behind where I want to be with preparing for MAME release.
* Revert "conflict resolution (nw)" andreasnaive2019-03-251-10/+10
| | | | | This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
* (nw) misc stuff: Vas Crabb2019-02-181-8/+8
| | | | | | * Document cross-compilation options * Use lowercase for some libraries that are lowercase in system32 on Windows anyway * Make USE_BUNDLED_LIB_SDL2=0 not use the bundled SDL
* attempt to fix testkeys linking in more configurations (nw) Vas Crabb2019-02-181-1/+1
|
* Fix cross compile mame/sdl/windows. (nw) couriersud2019-02-171-1/+1
|
* Discord plugin try 2 (#3640) cracyc2018-06-081-0/+1
| | | | | | | | | | | * 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)
* added -lSDL2main to fix linking with gcc 7 [smf] smf-2017-12-261-1/+2
|
* Attempted to sanitize/rationalize how we access UTF-8 command line arguments ↵ npwoods2017-09-181-8/+0
| | | | | | | | | | | (#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.
* Lua scripts cleanup. dankan18902017-05-141-1/+0
|
* comma (nw) Vas Crabb2017-01-231-1/+1
|
* This isn't behaving how I expect, investigate another time (nw) Vas Crabb2017-01-231-1/+2
|
* portaudio needs COM (nw) Vas Crabb2017-01-231-1/+1
|
* Convert OSD monitor info to modules plus add DXGI implementation Brad Hughes2016-09-141-1/+0
|
* Merge pull request #1093 from stevenc99/kfreebsd R. Belmont2016-07-161-1/+1
|\ | | | | GNU/kFreeBSD support
| * qtdbg: compile with -fPIC on freebsd also Steven Chamberlain2016-07-131-1/+1
| |
* | Take pkg-config path from env if defined Bernhard Frauendienst2016-07-091-2/+2
|/
* POSIX implementation for new directory read features, cleanup of Windows ↵ Vas Crabb2016-06-251-1/+2
| | | | implementation, return directory handle as smart pointer, fix full build [Vas Crabb]
* fix android target libSDL2 circular ref (nw) Jeffrey Clark2016-06-041-5/+7
| | | | | also rename ANDROID_NDK_ROOT -> ANDROID_NDK_LLVM to point directly to prebuilt host compiler (removes windows only restriction).
* Update windows to use platform independent watchdog implementation (nw) Miodrag Milanovic2016-04-151-2/+0
|
* moved osdsync to root of OSD, removed osdmini (nw) Miodrag Milanovic2016-04-151-3/+2
|
* Remove os dependant output handling (nw) Miodrag Milanovic2016-04-091-1/+0
|
* Not needed anymore after move to C++11 features (nw) Miodrag Milanovic2016-04-031-6/+0
|
* moved aueffectutil to tools (nw) Miodrag Milanovic2016-04-031-42/+0
|
* move clipboard handling on proper place (nw) Miodrag Milanovic2016-04-031-1/+0
|
* merge main.cpp for windows platform (unicode) (nw) Miodrag Milanovic2016-04-031-1/+1
|
* removed testkeys (nw) Miodrag Milanovic2016-04-031-71/+0
|
* scrclean on lua scripts (nw) Miodrag Milanovic2016-03-291-20/+20
|
* Initial work to make MAME work on Android [Miodrag Milanovic] Miodrag Milanovic2016-03-271-4/+4
|
* Fix SDL Windows build Vas Crabb2016-03-141-0/+4
|
* Make osd_file a polymorphic class that's held with smart pointers Vas Crabb2016-03-141-4/+21
| | | | | | | | | | | | | | | 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