aboutsummaryrefslogtreecommitdiff
path: root/core/sys
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #5246 from RichardFevrier/masterdev-2025-06gingerBill2025-06-021-5/+10
|\ | | | | Posix: Signal: add SIGWINCH support
| * Posix: Signal: add SIGWINCH supportRichard Février2025-05-311-5/+10
| |
* | Simplified function call to loadCstringDirectAlexander Lunsford2025-05-301-7/+3
| |
* | Fix odin.js loadCstring to use pointer address correctly.Alexander Lunsford2025-05-301-1/+1
|/
* Add missing SEL _cmd argument to objc class_addMethod IMPsZach Clark2025-05-272-97/+97
| | | | | | | | | | | | | When trying to grab the window pointer off the notification in a windowDidBecomeKey implementation, I kept getting segfaults calling notification->object(). The second argument of these needs to be a SEL. https://developer.apple.com/documentation/objectivec/class_addmethod(_:_:_:_:)?language=objc#Discussion I imagine existing code is getting by by setting the window information in the delegate's context userdata, which works fine when you only have one window as you can avoid needing to call notification->object(), until you want one delegate assigned to two windows, hard to work around.
* MAKEFOURCC: changed BYTE to byteVincent Billet2025-05-261-1/+1
|
* sys/info: populate cpu.physical_cores and cpu.logical_cores on DarwinLaytan Laats2025-05-261-0/+12
|
* HRESULT_FROM_WIN32 correctionVincent Billet2025-05-262-2/+2
|
* Merge branch 'odin-lang:master' into badaxis/Windows-Audio&WinmmVincent Billet2025-05-2611-45/+124
|\
| * Add core/hyperthread count for Windows and Linux (#5216)Jeroen van Rijn2025-05-2511-45/+124
| | | | | | | | | | Add core/hyperthread count to `core:sys/info` for Windows and Linux. TODO: Linux RISCV, Linux ARM, Darwin, and the BSDs.
* | Retracted some winmm changesVincent Billet2025-05-221-209/+0
| |
* | Reverted CoCreateInstance formattingVincent Billet2025-05-221-1/+7
| |
* | COM & Audio useful bindingsVincent Billet2025-05-213-24/+550
|/
* Formatting fixesKrzesimir Nowak2025-05-181-10/+10
|
* sys/linux: Improve documentation for Dirent and related proceduresKrzesimir Nowak2025-05-172-19/+51
|
* Fix -vet complaints in `core:sys/darwin/Foundation`Jeroen van Rijn2025-05-172-2/+0
|
* Add NSMenuItem.odingingerBill2025-05-171-0/+461
|
* Add Objective-C helper for creating subclassesgingerBill2025-05-174-94/+712
|
* Move things to constants.odinJeroen van Rijn2025-05-123-19/+23
|
* Update `linux.Map_Flags_Bits`Jeroen van Rijn2025-05-122-2/+21
| | | | | | | | | | | | | | | | | | | | | | Fixes #5151 - Removes `SHARED_VALIDATE` from the enum and turns it into `Map_Shared_Validate :: Map_Flags{.SHARED, .PRIVATE}` so it has the proper value of 0x03. - Adds `DROPPABLE`. - Adds constants `MAP_HUGE_SHIFT` and `MAP_HUGE_MASK`. - Adds the huge page precomputed constants from `mman.h`, defined as the log2 of the size shifted left by `MAP_HUGE_SHIFT`: Map_Huge_16KB Map_Huge_64KB Map_Huge_512KB Map_Huge_1MB Map_Huge_2MB Map_Huge_8MB Map_Huge_16MB Map_Huge_32MB Map_Huge_256MB Map_Huge_512MB Map_Huge_1GB Map_Huge_2GB Map_Huge_16GB
* os2: better copy_directory, and add native copy_file and copy_directory ↵Laytan Laats2025-05-084-12/+68
| | | | variants on MacOS
* Merge pull request #5091 from Badaxis/badaxis/windows-scancodesgingerBill2025-05-081-0/+172
|\ | | | | Adding windows keyboard scan codes
| * Adding windows keyboard scan codesVincent Billet2025-04-291-0/+172
| |
* | Fix CreateDibSection bindingJeroen van Rijn2025-05-051-1/+1
| |
* | win/sys: Add GetWindowThreadProcessIdomark962025-05-031-0/+2
|/
* Fix 2 selectors in NSDictionaryHarold Brenes2025-04-171-2/+2
|
* Fix linux.dirent_namejason2025-04-131-1/+1
| | | | Was not searching the first possible byte for 0.
* Remove stray import.Jeroen van Rijn2025-04-051-1/+0
|
* Fix segfault in core:sys/info on WSL2Jeroen van Rijn2025-04-051-6/+14
|
* net: rework errors to be cross-platformLaytan Laats2025-04-051-0/+1
|
* Add linux build tag to core/sys/linux/sys.odinHarold Brenes2025-04-021-0/+1
|
* Prevent odin.js from printing empty line in the console for the ending "\n"Jonathan Tron2025-03-261-6/+8
|
* Merge pull request #4959 from wisonye/mastergingerBill2025-03-241-14/+27
|\ | | | | Fixed: Freebsd syscall 'getpeername' is missing.
| * #4959, fixed the broken CI build.Wison Ye2025-03-231-2/+1
| |
| * Fixed: Freebsd syscall 'getpeername' is missing.Wison Ye2025-03-231-14/+28
| |
* | core/crypto/sha2: Use hardware SHA224/256 when available (AMD64)Yawning Angel2025-03-231-0/+2
|/
* Merge remote-tracking branch 'upstream/master'Wison Ye2025-03-223-11/+18
|\
| * fix typo for freebsd arm64 MINSIGSTKSZLaytan Laats2025-03-211-1/+1
| | | | | | | | Fixes #4878
| * fix tabsLaytan Laats2025-03-211-8/+8
| |
| * Prevent registering the same event listener twice on the same element with ↵Jonathan Tron2025-03-211-2/+9
| | | | | | | | the exact same data in wasm.
* | Fixed #4892: 'EPoll_Event.events' should be bit set.Wison Ye2025-03-222-17/+23
|/
* Fix add/remove event listeners in `core:sys/wasm`Jonathan Tron2025-03-203-29/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were multiple issues here: 1. listeners stored in the same key overwriting the previous one 2. missing `use_capture` parameter in `remove_event_listener`/`remove_window_event_listener` The key used to store the listener function in `listenerMap` was a javascript `Object`, when used as a key it was thus serialized to the string `"[object Object]"`, meaning all listeners where effectively set to the same key when calling `add_event_listener`/`add_window_event_listener`. Later on when calling `remove_event_listener`/`remove_window_event_listener`, it then tried to remove the incorrect one or none at all if there was a mix of the same event name registered on an element or the window. To fix I implemented a function `listener_key` in the javascript code which will generate a different key based on the event's: - `id`: dom element's id or 'window' (when event listener added to the window) - `name`: the event name (eg: `click`), each event handler should be removed for the event name it was register on. - `data`: we can register events with different data, each one generate a new listener which has to be removed. - `callback`: same as `data`, if you register two similar handler but with two different callback, each one should be removed. - `useCapture`: this one is a bit tricky, but when you register an event handler in javascript, if you don't pass `useCapture`, it defaults to `false`. When you remove an handler, you have to pass the exact same `useCapture` option you registered it with. In this case, we allowed to register an event with different `useCapture`, but didn't allow to pass the `useCapture` when removing it. We always called `removeEventListener` without the `useCapture` parameter which removed the handler properly only when it was registered with `useCapture=false`. I also switched the `WasmMemoryInterface.listenerMap` from `{}` (javascript object) to a `new Map()`, which is available everywhere nowadays.
* Merge pull request #4933 from laytan/js-open-bindinggingerBill2025-03-132-1/+9
|\ | | | | core/sys/wasm/js: add `open` binding to `window.open`
| * core/sys/wasm/js: add `open` binding to `window.open`Laytan Laats2025-03-122-1/+9
| |
* | Merge pull request #4932 from laytan/js-pointer-event-and-charcodegingerBill2025-03-132-0/+48
|\ \ | | | | | | core/sys/wasm/js: add pointer event info and add charCode to keyboard
| * | core/sys/wasm/js: add pointer event info and add charCode to keyboard eventsLaytan Laats2025-03-122-0/+48
| |/
* | Merge pull request #4931 from laytan/webgl-improvementsgingerBill2025-03-131-0/+10
|\ \ | | | | | | webgl: add `BlendEquationSeparate` and `GetParameter4i`
| * | webgl: add `BlendEquationSeparate` and `GetParameter4i`Laytan Laats2025-03-121-0/+10
| |/ | | | | | | | | | | | | | | | | `GetParameter4i` can be used to retrieve the current scissor rect, or the curent viewport, which was previously impossible. Also adds `BlendEquationSeparate` which seemed to be missing. Also removes an instance of `do`.
* / core/sys/wasm/js: improve gamepad APILaytan Laats2025-03-122-11/+46
|/ | | | | | 1. Properly set `id` and `mapping` on the `get_gamepad_state` result 2. Increase `id` limit to 96 bytes, connecting my DualShock 4 made it crash 3. If an `id` or `mapping` is longer than the limits, slice it and add `...`
* Fix linux.rt_sigactionjason2025-03-101-1/+1
| | | | Add missing polymorphic parameter to Sig_Action