Commit graph

32712 commits

Author SHA1 Message Date
sin-ack
9569841589 AK: Use Error::from_errno in adopt_nonnull_own_or_enomem
This fails to build on Lagom otherwise.
2022-01-13 15:16:12 +03:30
David Lindbom
1e773256bf Snake: Add link to help pages in menu 2022-01-13 03:45:17 -08:00
David Lindbom
fff9547d9b Base: Add manual page for Snake 2022-01-13 03:45:17 -08:00
David Lindbom
3a197eea92 Pong: Add link to help pages in menu 2022-01-13 03:45:17 -08:00
David Lindbom
aa231a1580 Base: Add manual page for Pong 2022-01-13 03:45:17 -08:00
David Lindbom
ae6d326388 Minesweeper: Add link to help pages in menu 2022-01-13 03:45:17 -08:00
David Lindbom
535b0be7fe Base: Add manual page for Minesweeper 2022-01-13 03:45:17 -08:00
David Lindbom
7cb713e043 Hearts: Add link to help pages in menu 2022-01-13 03:45:17 -08:00
David Lindbom
d4aad127ed Base: Add manual page for Hearts 2022-01-13 03:45:17 -08:00
David Lindbom
2cb0a35dbe GameOfLife: Add link to help pages in menu 2022-01-13 03:45:17 -08:00
David Lindbom
ecdcf4f293 Base: Add manual page for GameOfLife 2022-01-13 03:45:17 -08:00
David Lindbom
570d63b601 FlappyBug: Add link to help pages in menu 2022-01-13 03:45:17 -08:00
David Lindbom
ef30e5832a Base: Add manual page for FlappyBug 2022-01-13 03:45:17 -08:00
David Lindbom
e5c6026a9a Chess: Add link to help pages in menu 2022-01-13 03:45:17 -08:00
David Lindbom
b15b87486d Base: Add manual page for Chess game 2022-01-13 03:45:17 -08:00
David Lindbom
f19a849f39 Breakout: Add link to help pages in menu 2022-01-13 03:45:17 -08:00
David Lindbom
d0d3c0c615 Base: Add manual page for Breakout 2022-01-13 03:45:17 -08:00
David Lindbom
357a36b622 2048: Add link to help pages in menu 2022-01-13 03:45:17 -08:00
David Lindbom
e59556d531 Base: Add manual page for 2048 2022-01-13 03:45:17 -08:00
Chris Frey
8f3759c04f Meta: Use fuse2fs if available to avoid root when building image
The fuse2fs tool that is part of e2fsprogs-1.46 has a 'fakeroot'
mount option.  This allows a non-root users to modify file ownership
and permissions without actually being root.  This package is
available in Debian bullseye and buster-backports.

If available, the script assumes the user wants to use it.
Otherwise, it falls back to the usual root requirements.

Now that root is not required, the root check in
build-root-filesystem.sh is not necessary.  Since
build-root-filesystem.sh has 'set -e' enabled, removing this check
will not cause a change in functionality.
2022-01-13 03:35:21 -08:00
Chris Frey
951f7becec Meta: Use consistent indents in build-image-qemu.sh
This is a whitespace only commit to avoid confusion with the
next feature commit.
2022-01-13 03:35:21 -08:00
Chris Frey
319cdf4ff3 Meta: Do not ignore error message with exec
When calling sub-programs from shell with exec, the useful || die
idiom does not actually do anything, since the first script is gone.
2022-01-13 03:35:21 -08:00
Jelle Raaijmakers
8e935ad3b1 LibGL+LibSoftGPU: Implement glColorMaterial and GL_COLOR_MATERIAL
When `GL_COLOR_MATERIAL` is enabled, specific material parameters can
be overwritten by the current color per-vertex during the lighting
calculations. Which parameter is controlled by `glColorMaterial`.

Also move the lighting calculations _before_ clipping, because the spec
says so. As a result, we interpolate the resulting vertex color instead
of the input color.
2022-01-13 12:13:58 +01:00
Jelle Raaijmakers
9d4c2f6308 LibGL+LibSoftGPU: Calculate spotlight cutoff angle as degrees
We were storing the radians but never using that value in the GPU. We
now directly use the degrees value.
2022-01-13 12:13:58 +01:00
Jelle Raaijmakers
8c28d167c9 LibGL: Report unsupported capabilities in glEnable and glDisable 2022-01-13 12:13:58 +01:00
Jelle Raaijmakers
c03b21f0ea LibGL: Make MaterialFace a simple u8 enum
Now we don't need to use `to_underlying` everywhere.
2022-01-13 12:13:58 +01:00
Jelle Raaijmakers
58e025ac08 LibSoftGPU: Change Material vectors to FloatVector4
Same type, but more consistent with the rest of LibSoftGPU and LibGL.
2022-01-13 12:13:58 +01:00
Jelle Raaijmakers
db1509c0de LibGL: Use C++ casts in glColor 2022-01-13 12:13:58 +01:00
Luke Wilde
1fc611877f LibGL: Implement glIsTexture
Required by Xash3D for the r_showtextures command, where it shows every
allocated texture on screen.

Description of glIsTexture from the spec:
"glIsTexture returns GL_TRUE if texture is currently the name of a
texture. If texture is zero, or is a non-zero value that is not
currently the name of a texture, or if an error occurs, glIsTexture
returns GL_FALSE.

A name returned by glGenTextures, but not yet associated with a texture
by calling glBindTexture, is not the name of a texture."

https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glIsTexture.xhtml
2022-01-13 12:13:40 +01:00
Andreas Kling
adfb0846d2 Meta: Add kleines Filmröllchen to the contributors list :^) 2022-01-13 12:10:08 +01:00
Andreas Kling
0b66702697 Meta: Add Xexxa to the contributors list :^) 2022-01-13 12:08:12 +01:00
Andreas Kling
cfc9ce66d9 Kernel: Skip unnecessary TLB flush when growing kmalloc heap
When adding entirely new page table mappings, we don't need to flush
the TLB since they were not present before.
2022-01-13 11:22:11 +01:00
Andreas Kling
de05223122 Kernel: Don't flush TLB after creating brand-new mappings
The CPU will not cache TLB entries for non-present mappings, so we
can simply skip flushing the TLB after creating entirely new mappings.
2022-01-13 11:22:11 +01:00
kleines Filmröllchen
068aea660c AK: Explain why FixedArray has no move assignment 2022-01-13 11:17:44 +01:00
kleines Filmröllchen
594bbbf020 Tests: Test FixedArray completely
Except for tangential accessors such as data(), there is no more feature
of FixedArray that is untested after this large expansion of its test
cases. These tests, with the help of the new NoAllocationGuard, also
test the allocation contract that was fixated in the last commit.

Hopefully this builds confidence in future Kernel uses of FixedArray
as well as its establishment in the real-time parts of the audio
subsystem. I'm excited :^)
2022-01-13 11:17:44 +01:00
kleines Filmröllchen
1d144ed6fc AK: Remove clear() from FixedArray and fixate its allocation guarantees
FixedArray always *almost* had the following allocation guarantees:
There is (possibly) one allocation in the constructor and one (or more)
deallocation(s) in the destructor. No other operation allocates or
deallocates. With this removal of the public clear() method, which
nobody except the test used anyways, those guarantees are now completely
true and furthermore fixated with an explanatory comment.
2022-01-13 11:17:44 +01:00
kleines Filmröllchen
9bf2d0b718 AK: Disable NoAllocationGuard on Lagom
Because we don't have our LibC on Lagom, the allocation guard global
flag doesn't exist and NoAllocationGuard fails to build on Lagom.
Whoops. For now, just disable NoAllocationGuard's functionality here.
2022-01-13 11:17:44 +01:00
Linus Groh
b9093dd0ab LibJS: Don't validate time zone name when parsing Instant string
This is normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/2a81fbc
2022-01-13 10:08:34 +01:00
DaftMouse
6394ff4ea8 Base: Fix wrong keys in pt-br keymap
This puts ]} and \| on the right keys and adds ' "
2022-01-13 00:21:55 -08:00
electrikmilk
2a5bcc6bec Base: Correct Roman font name
I misunderstood the "Family" and "Name" fields.
2022-01-13 00:20:32 -08:00
Idan Horowitz
40159186c1 Kernel: Remove String use-after-free in generate_auxiliary_vector
Instead we generate the random bytes directly in
make_userspace_context_for_main_thread if requested.
2022-01-13 00:20:08 -08:00
Idan Horowitz
215e031bf5 Kenrel: Use a KString for Ext2FSDirectoryEntry::name
This brings Ext2FileSystem one step closer to being OOM-safe.
2022-01-13 00:20:08 -08:00
Idan Horowitz
0e44bb7d82 Kernel: Add a KString::bytes() helper 2022-01-13 00:20:08 -08:00
Idan Horowitz
3098b11c07 Kernel: Remove unused AK/String.h include from CommandLine.h 2022-01-13 00:20:08 -08:00
Idan Horowitz
e72bbca9eb Kernel: Fix OOB write in sys$uname
Since this was only out of bounds of the specific field, not of the
whole struct, and because setting the hostname requires root privileges
this was not actually a security vulnerability.
2022-01-13 00:20:08 -08:00
Idan Horowitz
50d6a6a186 Kernel: Convert hostname to KString 2022-01-13 00:20:08 -08:00
Idan Horowitz
6402840670 Kernel: Replace {KString => String}::formatted in determine_boot_device 2022-01-13 00:20:08 -08:00
Idan Horowitz
ec1f3abd34 Kernel: Use KString::formatted in FramebufferDevice::create_framebuffer
This allows us to avoid the infallible String::formatted.
2022-01-13 00:20:08 -08:00
Idan Horowitz
618f123463 Kernel: Use StringView instead of String in RingBuffer's constructor
This String was being copied into a KString internally anyways.
2022-01-13 00:20:08 -08:00
Idan Horowitz
792b8ca13c Kernel: Use StringView::to_uint instead of String::to_uint in ProcFS 2022-01-13 00:20:08 -08:00