get_vnode could be called with a NULL privateNode in the kernel, but not
in userlandfs. This would crash in cdda mount code (and from a grep
search, also with several other filesystems).
Now cdda can be mounted with userlandfs, and CDs read that way, but for
some reason there is no CDDB renaming of the tracks in that case.
The menu would try to relayout itself, but fail to get the supermenu
bounds as the looper for it was not locked in that case.
This fixes the crash with two downsides:
* The menu width isn't adjusted to match the parent menu (mostly visible
in BMenuFields)
* There is some flickering as the menu is updated
Fixes#9863 (Network prefs part).
It is possible to set a custom layout on a BBox, which is then applied
to the children excluding the label. However, the label size must still
be used when computing the minimal size of the BBox in that case.
* Factor out the notification sending in a single method
* Tweak the "progress" values so the progress bar goes from 0 to 100% in
order, and only once, during the restart
* Remove one notification that was needlessly sent twice
* Some other small cleanups
Final fix for #8171.
It's ther that the view background color is inherited from the parent.
Fix option popups having a white background eg. in MediaPlayer
preferences.
Thanks to DeadYak for noticing the problem.
In some locales the title is longer than the space there is for it. Make
sure the boxes are wide enough for the title to display completely.
Fixes#11611.
* When the endianness is not intialized, assume B_MEDIA_HOST_ENDIAN.
This is probably what was meant (and this is what Worms Armageddon
means).
* Move creation of the media nodes back to the initialisation instead of
StartPlaying, otherwise an extra node is created each time the sound is
played.
* Use a template to avoid repeating the panning code for each type
* Rearrange the initialization of BSimpleGameSound so the data is only
copied 0 or 1 times (it was copied 2 or 3 times in some cases) between
the passed buffer and the final one,
* Don't execute the panning code on streams with only 1 channel as this
makes no sense and it will read and write outside the buffers
* Abort early in GameSoundBuffer::Play if fIsPlaying is false.
Fix the crashes in Worms Armageddon. Doesn't fix the sounds being mostly
white noise.
Fixes#4078.
When font hinting is disabled, the width of a string may not be an
integer number of pixels. This results in the tab position also being
non-integer, and the drawing code doesn't handle this, resulting in part
of the tab being shifted 1px to the right.
Snap the rectangle to the pixel grid so the runding error doesn't
happen.
* Fixes#3970 without introducing the bugs from BeOS
* Makes it easy to override BStringItem just to change the text color.
* Makes it easy to implement custom list items using the correct colors.
* This shows the problem in Haiku, it is not easily possible to change the
color of BStringItem.
* It also shows that the BeOS implementation doesn't restore the view
state after drawing items, so the last item in the list also draws
green, and selecting the first also makes it green.
Instead of showing plain red, green and blue color ramps, show what
the color would be if you moved the sliders to each point.
This is what was done on Mac OS classic and is also used in some other
tools to help you targetting a particular color.
It also limits the need for a color preview, which BColorControl
currently doesn't include, forcing apps to implement one themselves.
Fixes#3790 (the patch there didn't apply anymore, so I redid the work.
Credits for the change should go to stpere).
According to Colin this is not supposed to happen, but it does. Since
the affected video otherwise decodes just fine, I think it is safe to
disable the assert and not annoy our users.
Fixes#11409.
* The APE SDK can only decode rather big chunks at a time (several
seconds), so our reader keeps an internal buffer of the last decoded
chunk.
* However, this was always dropped when seeking, meaning the same few
seconds of sound were decoded again and again.
* I'm not sure why MediaPlayer is trying to seek to the position it
already is at, but we can make it work, so why not.
Now the existing buffer is reused if possible when seeking. This makes
it possible to play APE files in MediaPlayer.
Also, several more style fixes.
This makes it possible to %include local files. nasm doesn't allow this
otherwise (include paths are assumed relative to the working directory).
Fixes build of ape_reader.
This change was introduced by Colin for DVB-T support, however it also
breaks the timing of several MP4 files. The code is incomplete and
computes slightly to very wrong frame rates (one video plays about twice
as fast as needed, another one attempts to play at 30000 FPS).
I suspect similar problems would be found when changing the frame rate
in DVB-T streams in the same way, so I'm disabling this code for now
until a correct solution is found or we manage to use a newer version of
ffmpeg (where there is an actual framerate field in the format and it
doesn't need to be derived from the time_base anymore).
This restores the previous behavior of computing the framerate at the
AVFormatReader level, that is, once per stream, rather than once per
frame. At the stream level we have enough data to compute an "average"
frame rate, and there is also an "r_frame_rate" (real frame rate) which
may be usable for this. Not having working DVB-T hardware to experiment
with that yet, I'll leave it to others.
Fixes#11283 and the last remaining problem in #4512.
* Also known as the YUV9 FourCC and used in SVQ1 (early QuickTime)
videos.
* Fixes part of #4512 (one more video played correctly) and replay of
all old Quicktime videos when you don't have overlay support.
* Fixes#10359.
* Thanks to Laurent Chea for investigating and identifying the problem.
His patch was not used because it makes more changes than needed.
The interpolation was performed only on the samples in a buffer,
without "linking" with the previous one. This can't work.
* Remember the last sample from a buffer to be able to use it when
interpolating the first samples of the next one
* Adjust the kernel to properly loop over all samples in the buffer
Fixes#9438.
The Interpolating mixer has internal state which must be setup by a
previous frame (we assume 0 for the first frame). Since we work on
exactly a period of the wave here, sending the same data twice works as
it should.
* Shows a source wave (black), a sampled version of it (red), and a
resampled version of that using the mixer (green).
* Debugging tool for #9438. Shows that the drop/repeat resampler is
working ok, but interpolate is quite broken.
This was available in R5 but somehow went missing from our version of
the Be Book (it is documented in the release notes in Tycom Systems
version). Document the more important methods of it, at least.
There is no need to copypaste the resampling code which is mostly the
same for all formats. However, gcc2 is confused by member function
templates (I hit an internal compiler error) so the resampling code was
moved to a static function instead.
* Do not move the window, this is annoying
* Instead of putting the window at a fixed size, keep the current width
and adjust the height so the preview has a correct aspect ratio.
Fixes#5034.
When a gradient has no stop at offset 0 or 255, the drawing code will
not automatically complete the gradiet with the first or last color,
instead agg interpolation generated invalid random colors.
To avoid this, insert extra stops at the start and end in the
DrawingEngine when we prepare the gradient for drawing. We just copy the
first and last stops to new stops at offsets 0 and 255, which makes sure
the gradients covers the whole range and gives the expected result.
Fixes#2945.
There doesn't seem to be anything ini the implementation that would
cause a problem, as long as you don't try to change this while the
window is already open.
As pointed by Axel and explained in Synaptic docs, the touchpad should
delay the first command itself until it's ready, so an arbitrary delay
should not be needed after reset.
Note: I don't have a touchpad on my machine. Please test this :)
Depending on the locale and string length the layout could leave only a
small part of the window for the rightmost part, which is the important
thing. Force the weight of each side so we have a more balanced window.
* Fixes relevant part of #5125
* The remaining information (serial number, frequency ranges) is
"advanced" and can be hidden in the tooltip. However, the video driver
used may be important important information, if you want to know if you
are using VESA, or if you have multiple video cards (Optimus for
example).
Required for work on completing BFont implementation (::Blocks and
::IsFullAndHalfFixed can be provided using fontconfig data), as well as
a more correct font overlay and/or language > font mapping.
Using item->SetExpanded does not work in a BOutlineListView as the
status of the list is then out of sync. The child items are not actually
added to the visible list, and trying to select them won't work.
Using list->Expand() instead works fine, so do that.
Fixes the remaining part of #6805.
* I'm not sure why this was changed back in 2006, the file panel is
reused in various cases but I don't see one where selecting a folder
would make sense.
* If I missed something, then different file panels should be used for
the different cases.
Fixes#8805.
* I went with my own graphics as the one in the preflet didn't look that
nice
* The clicked button is shown using a bold font rather than filling it
grey. I was too lazy to find the correct BShapes for all cases (1, 2 and
3 button mouses)
Fixes#6825.
gcc2 was relying on the c99 functions being there, but they are not in
the std namespace.
* Disable the C99 functions and macros in C++ mode
* Redefine them as inline functions in cmath in the std namespace.
Fixes#7396.
* There is no need to delay this to AllAttached
* Apps may want to override the SetDivider, and doing it as late as
AllAttached can be annoying.
Fixes#10734.