28 Commits

Author SHA1 Message Date
Cameron Gutman
b282c7e603 Ensure UNIX implementations of PltGetMillis() are not limited to 32 bits 2022-10-22 14:45:19 -05:00
Cameron Gutman
6d767a8494 Assume the platform supports clock_gettime() if CLOCK_MONOTONIC is defined 2022-10-22 14:45:19 -05:00
Cameron Gutman
71a267fd28 Change PltWaitForEvent to void return type 2021-06-09 19:37:06 -05:00
Cameron Gutman
61b4fc1fe7 Add condition variable support and reimplement PLT_EVENT with it for non-Win32 platforms 2021-06-09 19:29:31 -05:00
Cameron Gutman
ccec4e8475 Add thread naming on macOS and iOS 2021-06-09 03:00:25 -05:00
GaryOderNichts
e5b39af6a5 some Wii U changes 2021-06-05 01:59:58 +02:00
GaryOderNichts
0c66a50e2d Wii U platform support 2021-06-04 21:36:54 +02:00
Cameron Gutman
46cea5011d Use GetModuleHandle() for kernel32.dll, since it's guaranteed to be loaded already 2021-05-25 19:40:14 -05:00
Cameron Gutman
daee5db7bc Use SleepEx() instead of WaitForSingleObjectEx() to implement PltSleepMs()
This was legacy cruft from back when Sleep() was forbidden in Metro apps in Win8.0.
2021-05-16 11:41:38 -05:00
Cameron Gutman
ed9301f3f8 Join the input thread without interrupting first
Otherwise we'll kill it before it finishes draining
2021-05-15 22:56:44 -05:00
Cameron Gutman
bc1b5a1b2f Fix Linux build 2021-04-29 17:40:13 -05:00
Cameron Gutman
8f371343cd Consolidate includes 2021-04-29 17:22:15 -05:00
Cameron Gutman
ae92f15b0a Use SRW locks for our mutex on Windows
These avoid a kernel transition for uncontended cases
2021-04-25 15:04:12 -05:00
Cameron Gutman
5f9f7ce407 Code cleanup: use stdbool.h 2020-11-30 20:38:13 -06:00
Cameron Gutman
9e4651e460 Fix implicit function declaration warnings 2020-08-29 21:13:54 -07:00
Cameron Gutman
5ddd53e17f Enable media streaming mode for 802.11 WLAN interfaces on Windows 2020-08-11 22:12:58 -07:00
Cameron Gutman
1154cb1d3d Name our threads on Windows 2019-05-03 20:55:20 -07:00
Cameron Gutman
31aa893acd Name our threads on Linux 2019-05-03 18:54:40 -07:00
Cameron Gutman
d6971983aa Use an interruptible sleep to allow our threads to exit sooner 2019-04-06 15:26:59 -07:00
Cameron Gutman
c9745855fd Track leaks of mutexes and events for debugging 2019-03-17 12:56:27 -07:00
Cameron Gutman
487a62f58c Fix MSVC build issues 2018-09-25 00:56:43 -07:00
Cameron Gutman
dd7820f100 Add LiGetMillis() for clients to use for latency calculation 2018-09-25 00:47:22 -07:00
Cameron Gutman
454fdccffc Fix possible lost wakeups by acquring event mutex in signal path 2017-08-20 00:28:15 -07:00
Cameron Gutman
e3dadc3c08 Fix a couple files with bogus permissions 2017-08-20 00:28:15 -07:00
Cameron Gutman
af6f13c7fa Use clock_gettime() for better timestamps on platforms that support it 2017-06-10 12:07:25 -07:00
Sunguk Lee
5ab67fb864
vita: Increate thread stack size
readsolomon require large stack memory for the [decode][1]

lazy calucation: 0x105f9
  - dataDecodeMatrix: 255 * 255
  - subShards: 255 * 4
  - outputs:  255 * 4

Fixes #27

[1]: https://github.com/moonlight-stream/moonlight-common-c/blob/9bf8d36/reedsolomon/rs.c#L500-L502
2017-05-05 18:53:16 +09:00
Sunguk Lee
ba27e97698 Add vita environment (#22)
* vita: initial port

* vita: implement events, enable input thread

* vita: gethostbyname

* vita: Enable audio

* vita: Fix thread crash on discoonect process

* vita: Handle cannot create thread

* vita: now use newlib's socket apis

* vita: Refactoring for moonlight-stream/moonlight-common-c

* Fix review things

https://github.com/moonlight-stream/moonlight-common-c/pull/22#pullrequestreview-2436093

- vita may not support IPv6; so add LC_ASSERT them.
- define inet_ntop to sceNetInetNtop
- guard about failure of sceKernelCreateMutex or sceKernelCreateCond
- remove meanless macros

https://github.com/moonlight-stream/moonlight-common-c/pull/22#pullrequestreview-2444677

- !*mutex to *mutex
- remove useless LC_ASSERT then change to use inet_ntop
  in vita system not defined `sockaddr_in6`, so just use `sockaddr_in` instead this.

https://github.com/moonlight-stream/moonlight-common-c/pull/22#pullrequestreview-2445642

- define sin6_addr
2016-10-05 16:43:33 -07:00
Cameron Gutman
48a5d63045 Reorganize the folder structure and delete the Xcode build files 2016-03-31 07:22:03 -04:00