Commit Graph

32 Commits

Author SHA1 Message Date
GovanifY 132431b7c8 headers: relicense to GPL-3.0+
also update to 2024 while i'm at it
2024-07-30 17:17:13 -04:00
Stenzek 480bd2da4b DarwinMisc: Use template sysctlbyname 2024-06-14 20:45:44 +10:00
Stenzek 4e0e8cef54 Common: ARM64 compatibility 2024-06-14 17:06:45 +10:00
Stenzek d48f527d6d Common: Tidy up signal handlers
Move MacOS into its own file.
Fix assertion failure crash dumping.
2024-05-31 13:39:36 +10:00
Stenzek ecbe239c0b Common: Use Mach VM routines for memory mapping
MacOS does not support an equivalent of MAP_FIXED_NOREPLACE via mmap(),
which means that our usage for allocating PCSX2's memory map is not
thread-safe.
2024-05-30 13:39:07 +10:00
Stenzek c7a21a60cf GS: Improve vsync mode selection
All games use mailbox/triple buffering. Except when you enable sync to
host refresh, in which case FIFO/double buffering is used.

This means vsync enabled will ever tear, but at the same time, never
drop to 30fps on a missed frame due to frame rate differences.

To have the "best of both worlds", you should enable vsync and sync to
host refresh. Previously, this resulted in additional input lag, since
the host vsync would drive the EE frame timing. Now, this behaviour is
disabled by default, unless you enable "Use Host VSync Timing".
2024-05-25 14:06:50 +10:00
Stenzek 59d29b3648 Common: Rename General to HostSys
Actually fits what it's doing.
2023-12-27 13:55:35 +10:00
Stenzek 308f8c5112 x86emitter: Abstract MXCSR into a general FPControlRegister type 2023-12-27 13:55:35 +10:00
Stenzek d9abe10308 Misc: Remove explicit PCH include, switch to SPDX 2023-12-24 14:03:14 +10:00
Stenzek 8a8e6c5d20 Common: Purge CPU frequency measurement
It's not accurate, and we can query the registry for the TSC frequency
for thread timers.

Also replaces InitCPUTicks() with a global constructor.
2023-06-16 18:26:28 +10:00
TellowKrinkle a2c6e050d7 VMManager: MacOS CPU count detection 2023-05-27 04:57:50 +01:00
Connor McLaughlin aea6a9f534 Common: Add Threading::SleepUntil() 2022-12-08 09:36:41 +00:00
TellowKrinkle be6598e224 Threading: DarwinSemaphore.cpp things no longer need to be cancellation points 2022-12-03 02:44:25 +01:00
Connor McLaughlin f63e1b3760 Qt: Implement screensaver inhibit 2022-10-03 11:55:31 +01:00
Connor McLaughlin 457ec7f6f5 Threading: Add lightweight thread wrapper 2022-06-04 18:10:46 +01:00
TellowKrinkle fc06963c56 Common: Implement screensaver prevention on macOS 2022-05-30 16:38:01 -05:00
C.W. Betts 66c6c2400a Some Qt for Mac fixes. 2022-05-27 21:21:48 -05:00
Connor McLaughlin 893b3c629d Everything: Remove a **lot** of wx, and px nonsense
- common has no wx left except for Path.
 - pcsx2core only has it in a few places (memory cards and path related
   stuff).
2022-05-22 13:58:56 +01:00
Connor McLaughlin e5716922a3 Common/Threading: Move a bunch of unnecessary wrappers to gui 2022-05-09 16:06:33 +01:00
Connor McLaughlin 1e8332f36a Misc: Move pxThread and friends to gui 2022-05-08 05:40:59 +01:00
Connor McLaughlin 096696bed7 Misc: Replace core usage of Semaphore with KernelSemaphore
i.e. decouple it from the UI.
2022-05-08 05:40:59 +01:00
Connor McLaughlin 6ebb8c2e91 Threading: Add ThreadHandle class 2022-05-02 14:25:05 +01:00
TellowKrinkle d733730950 Common: Add WorkSema 2022-04-15 08:41:58 +01:00
Connor McLaughlin 876ea3db52 Common: Purge pxStreams and some other wx string routines 2022-04-15 08:15:40 +01:00
tellowkrinkle 37e2142cca Common: Fix Darwin thread times
Percentages will now actually be percentages instead of permille (units of 1/1000)
Was caused by trying to match Windows's returns of 100ns units, but then reporting 1µs units from `GetThreadTicksPerSecond()`
2021-11-05 23:11:53 -05:00
TellowKrinkle 881b017606 Utilities: Add TryWait and spin waits to semaphore and mutex 2021-10-19 16:04:15 -04:00
TellowKrinkle cf02893d22 macOS: faster semaphores
mach semaphore is kernel-only, and doesn't have a userspace fast path
2021-10-19 16:04:15 -04:00
Connor McLaughlin 43dfbe3f29 Move more classes from common to gui 2021-10-01 23:46:52 -04:00
TellowKrinkle 5435718167 Common: Clean up DarwinMisc 2021-09-23 22:45:37 -05:00
Kojin 13dfceff48
Common: reformat (#4720)
* common: format AlignedMalloc.cpp

* common: format AppTrait.h

* common: format Assertions.h

* common: format CheckedStaticBox

* common: format Console

* common: format Dependencies.h

* common: format EmbeddedImage

* common: format EventSource

* common: format Exceptions

* common: format FastFormatString.cpp

* common: format General.h

* common: format InitInterface

* common: format MathUtils.h

* common: format MemsetFast/MemcpyFast

* common: format Mutex.cpp

* common: format PageFaultSource.h

* common: format Path.h

* common: format PathUtils.cpp

* common: format Pcsx2Types.h

* common: format Perf

* common: format PersistentThread.h

* common: format RwMutex

* common: format SafeArray

* common: format ScopedAlloc.h

* common: format ScopedPtrMT.h

* common: format Semaphore.cpp

* common: format StringHelpers

* common: format ThreadTools.cpp

* common: format Threading.h

* common: format ThreadingDialogs

* common: format ThreadingInternal.h

* common: format TraceLog.h

* common: format VirtualMemory.cpp

* common: format pxCheckBox

* common: format pxEvents.h

* common: format pxForwardDefs.h

* common: format pxRadioPanel

* common: format pxStaticText

* common: format pxStreams

* common: format pxTranslate.cpp

* common: format pxWindowTextWriter.cpp

* common: format wxAppWithHelpers

* common: format wxBaseTools.h

* common: format wxGuiTools

* common: format wxHelpers.cpp

* common: format Darwin directory

* common: format Linux directory

* common: format Windows directory

* common: format LnxCpuDetect.cpp

* common: format WinCpuDetect.cpp

* common: format bmi.cpp

* common: format cpudetect.cpp

* common: format cpu_detect_internal.h

* common: format fpu.cpp

* common: format groups.cpp

* common: format instructions.h

* common: format internal.h

* common: format jmp.cpp

* common: format legacy.cpp

* common: format legacy_instructions.h

* common: format legacy_internal.h

* common: format movs.cpp

* common: format simd.cpp

* common: format tools.h

* common: format x86emitter.cpp

* common: format x86types.h

* common: format bmi.h

* common: format dwshift.h

* common: format group1.h group2.h group3.h

* common: format incdec.h

* common: format jmpcall.h

* common: format movs.h

* common: format simd_arithmetic.h

* common: format simd_comparisons.h

* common: format simd_helpers.h

* common: format simd_moremovs.h

* common: format simd_shufflepack.h

* common: format simd_templated_helpers.h

* common: format test.h
2021-09-06 14:28:26 -04:00
kojin 0717bf788a common: fix cmake on linux/macos 2021-09-04 18:28:07 -04:00
kojin 8fdaaa2eab common: reorganize 2021-09-04 18:28:07 -04:00