pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/emulators/mame



Module Name:    pkgsrc
Committed By:   wiz
Date:           Sat Jun  8 16:06:26 UTC 2024

Modified Files:
        pkgsrc/emulators/mame: distinfo
        pkgsrc/emulators/mame/patches:
            patch-src_osd_modules_input_input__sdl.cpp

Log Message:
mame: adapt patch after discussion


To generate a diff of this commit:
cvs rdiff -u -r1.144 -r1.145 pkgsrc/emulators/mame/distinfo
cvs rdiff -u -r1.3 -r1.4 \
    pkgsrc/emulators/mame/patches/patch-src_osd_modules_input_input__sdl.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/emulators/mame/distinfo
diff -u pkgsrc/emulators/mame/distinfo:1.144 pkgsrc/emulators/mame/distinfo:1.145
--- pkgsrc/emulators/mame/distinfo:1.144        Sat Jun  8 14:47:48 2024
+++ pkgsrc/emulators/mame/distinfo      Sat Jun  8 16:06:26 2024
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.144 2024/06/08 14:47:48 wiz Exp $
+$NetBSD: distinfo,v 1.145 2024/06/08 16:06:26 wiz Exp $
 
 BLAKE2s (mame-0.266.tar.gz) = 20b85dad670c54994f4574f1991d180be22d464109e2fac8d0857038c1d2dddd
 SHA512 (mame-0.266.tar.gz) = f72e266bc9dfd9a9b19a66ce5763d6919b90aff52fe75bccdc17b7788363e507f6c707b05a1a36ee982321eb98ab0868fff6534e2ce57e516d6a12352f7e4938
@@ -8,4 +8,4 @@ SHA1 (patch-3rdparty_genie_build_gmake.d
 SHA1 (patch-makefile) = 343fac4d165438a26e2e8077216db1c6c46a5d1e
 SHA1 (patch-scripts_src_3rdparty.lua) = 70cd98a85533178a742a51f98606f10f19a64824
 SHA1 (patch-scripts_toolchain.lua) = df383dab4787f58348d62e1c5f25ddaa45eb8199
-SHA1 (patch-src_osd_modules_input_input__sdl.cpp) = c061768ea92c21f336f341646c25d966181e7241
+SHA1 (patch-src_osd_modules_input_input__sdl.cpp) = 252a34a66ffb582b152ebcd32305ff1e462b5c77

Index: pkgsrc/emulators/mame/patches/patch-src_osd_modules_input_input__sdl.cpp
diff -u pkgsrc/emulators/mame/patches/patch-src_osd_modules_input_input__sdl.cpp:1.3 pkgsrc/emulators/mame/patches/patch-src_osd_modules_input_input__sdl.cpp:1.4
--- pkgsrc/emulators/mame/patches/patch-src_osd_modules_input_input__sdl.cpp:1.3        Sat Jun  8 14:47:48 2024
+++ pkgsrc/emulators/mame/patches/patch-src_osd_modules_input_input__sdl.cpp    Sat Jun  8 16:06:26 2024
@@ -1,29 +1,15 @@
-$NetBSD: patch-src_osd_modules_input_input__sdl.cpp,v 1.3 2024/06/08 14:47:48 wiz Exp $
+$NetBSD: patch-src_osd_modules_input_input__sdl.cpp,v 1.4 2024/06/08 16:06:26 wiz Exp $
 
 Fix "lround is not a member of std::" on NetBSD.
 https://github.com/mamedev/mame/issues/12458
 
 --- src/osd/modules/input/input_sdl.cpp.orig   2024-05-29 17:42:54.000000000 +0000
 +++ src/osd/modules/input/input_sdl.cpp
-@@ -786,8 +786,8 @@ public:
-               case SDL_MOUSEWHEEL:
-                       // adjust SDL 1-per-click to match Win32 120-per-click
- #if SDL_VERSION_ATLEAST(2, 0, 18)
--                      m_v += std::lround(event.wheel.preciseY * 120 * input_device::RELATIVE_PER_PIXEL);
--                      m_h += std::lround(event.wheel.preciseX * 120 * input_device::RELATIVE_PER_PIXEL);
-+                      m_v += lround(event.wheel.preciseY * 120 * input_device::RELATIVE_PER_PIXEL);
-+                      m_h += lround(event.wheel.preciseX * 120 * input_device::RELATIVE_PER_PIXEL);
- #else
-                       m_v += event.wheel.y * 120 * input_device::RELATIVE_PER_PIXEL;
-                       m_h += event.wheel.x * 120 * input_device::RELATIVE_PER_PIXEL;
-@@ -888,8 +888,8 @@ public:
-               case SDL_MOUSEWHEEL:
-                       // adjust SDL 1-per-click to match Win32 120-per-click
- #if SDL_VERSION_ATLEAST(2, 0, 18)
--                      m_v += std::lround(event.wheel.preciseY * 120 * input_device::RELATIVE_PER_PIXEL);
--                      m_h += std::lround(event.wheel.preciseX * 120 * input_device::RELATIVE_PER_PIXEL);
-+                      m_v += lround(event.wheel.preciseY * 120 * input_device::RELATIVE_PER_PIXEL);
-+                      m_h += lround(event.wheel.preciseX * 120 * input_device::RELATIVE_PER_PIXEL);
- #else
-                       m_v += event.wheel.y * 120 * input_device::RELATIVE_PER_PIXEL;
-                       m_h += event.wheel.x * 120 * input_device::RELATIVE_PER_PIXEL;
+@@ -31,6 +31,7 @@
+ #include <SDL2/SDL.h>
+ 
+ #include <algorithm>
++#include <cmath>
+ #include <cctype>
+ #include <chrono>
+ #include <cstddef>



Home | Main Index | Thread Index | Old Index