Skip to content

Commit

Permalink
Update borealis
Browse files Browse the repository at this point in the history
  • Loading branch information
xfangfang committed Feb 6, 2025
1 parent fccd8fd commit 94f3915
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 8 deletions.
1 change: 1 addition & 0 deletions wiliwili/source/activity/pgc_index_activity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//

#include <pystring.h>
#include <yoga/YGNode.h>
#include <borealis/core/touch/tap_gesture.hpp>
#include <borealis/core/thread.hpp>
#include <borealis/views/applet_frame.hpp>
Expand Down
3 changes: 2 additions & 1 deletion wiliwili/source/fragment/player_single_comment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Created by fang on 2023/1/6.
//

#include <cmath>
#include <utility>
#include <borealis/views/applet_frame.hpp>
#include <borealis/core/touch/tap_gesture.hpp>
Expand Down Expand Up @@ -299,7 +300,7 @@ void PlayerSingleComment::setCommentData(const bilibili::VideoCommentResult& res
}

void PlayerSingleComment::showStartAnimation(float y) {
if (isnan(y)) return;
if (std::isnan(y)) return;
commentOriginalPosition = y;

brls::Application::blockInputs();
Expand Down
3 changes: 2 additions & 1 deletion wiliwili/source/utils/config_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#endif
#endif

#include <cmath>
#include <borealis/core/application.hpp>
#include <borealis/core/cache_helper.hpp>
#include <borealis/core/touch/pan_gesture.hpp>
Expand Down Expand Up @@ -381,7 +382,7 @@ void ProgramConfig::loadHomeWindowState() {
}

void ProgramConfig::saveHomeWindowState() {
if (isnan(VideoContext::posX) || isnan(VideoContext::posY)) return;
if (std::isnan(VideoContext::posX) || std::isnan(VideoContext::posY)) return;
if (VideoContext::FULLSCREEN) return;
auto videoContext = brls::Application::getPlatform()->getVideoContext();

Expand Down
1 change: 1 addition & 0 deletions wiliwili/source/view/auto_tab_frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
limitations under the License.
*/

#include <tinyxml2.h>
#include <borealis/views/rectangle.hpp>
#include <utility>

Expand Down
3 changes: 2 additions & 1 deletion wiliwili/source/view/gallery_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Created by fang on 2022/8/21.
//

#include <cmath>
#include <borealis/core/touch/tap_gesture.hpp>
#include <borealis/core/application.hpp>
#include <borealis/views/image.hpp>
Expand Down Expand Up @@ -53,7 +54,7 @@ GalleryView::GalleryView() {
if (status.state != brls::GestureState::END) return;
float width = getWidth();
float x = getX();
if (isnan(width) || isnan(x)) return;
if (std::isnan(width) || std::isnan(x)) return;
if (status.position.x < x + width * 0.25) {
this->prev();
} else if (status.position.x > x + width * 0.75) {
Expand Down
3 changes: 2 additions & 1 deletion wiliwili/source/view/mpv_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include <cstdlib>
#include <clocale>
#include <cmath>
#include <pystring.h>
#include <borealis/core/thread.hpp>
#include <borealis/core/application.hpp>
Expand Down Expand Up @@ -625,7 +626,7 @@ void MPVCore::initializeVideo() {

void MPVCore::setFrameSize(brls::Rect r) {
rect = r;
if (isnan(rect.getWidth()) || isnan(rect.getHeight())) return;
if (std::isnan(rect.getWidth()) || std::isnan(rect.getHeight())) return;

#ifdef MPV_SW_RENDER
#ifdef BOREALIS_USE_D3D11
Expand Down
6 changes: 4 additions & 2 deletions wiliwili/source/view/text_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include <utility>
#include <codecvt>
#include <locale>
#include <cmath>
#include <yoga/YGNode.h>
#include <borealis/core/application.hpp>

#include "view/text_box.hpp"
Expand Down Expand Up @@ -93,7 +95,7 @@ static YGSize textBoxMeasureFunc(YGNodeRef node, float width, YGMeasureMode widt
};

if (heightMode == YGMeasureMode::YGMeasureModeExactly) return size;
if (richTextData.empty() || isnan(width)) return size;
if (richTextData.empty() || std::isnan(width)) return size;

size.height = textBox->cutRichTextLines(width);
textBox->setParsedDone(true);
Expand Down Expand Up @@ -162,7 +164,7 @@ void TextBox::setText(const std::string& value) {

void TextBox::onLayout() {
float width = getWidth();
if (isnan(width) || width == 0) return;
if (std::isnan(width) || width == 0) return;
if (this->richContent.empty()) return;
if (!this->parsedDone) this->cutRichTextLines(width);
}
Expand Down
3 changes: 2 additions & 1 deletion wiliwili/source/view/video_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//

#include <limits>
#include <cmath>

#include <borealis/views/label.hpp>
#include <borealis/views/progress_spinner.hpp>
Expand Down Expand Up @@ -1119,7 +1120,7 @@ void VideoView::refreshToggleIcon() {

void VideoView::setProgress(float value) {
if (is_seeking) return;
if (isnan(value)) return;
if (std::isnan(value)) return;
this->osdSlider->setProgress(value);
}

Expand Down

0 comments on commit 94f3915

Please sign in to comment.