From 2d6155fc85d25a8fd8a1efa2bda29212716df903 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 24 Aug 2021 17:43:31 +0300 Subject: [PATCH] Throw fp exceptions in Windows 32 bit build. --- Telegram/SourceFiles/core/launcher.cpp | 6 +++--- Telegram/SourceFiles/core/launcher.h | 4 +--- .../SourceFiles/media/streaming/media_streaming_file.cpp | 2 ++ Telegram/lib_crl | 2 +- cmake | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Telegram/SourceFiles/core/launcher.cpp b/Telegram/SourceFiles/core/launcher.cpp index fa0fae673..f89ae874f 100644 --- a/Telegram/SourceFiles/core/launcher.cpp +++ b/Telegram/SourceFiles/core/launcher.cpp @@ -270,12 +270,12 @@ std::unique_ptr Launcher::Create(int argc, char *argv[]) { return std::make_unique(argc, argv); } -Launcher::Launcher( - int argc, - char *argv[]) +Launcher::Launcher(int argc, char *argv[]) : _argc(argc) , _argv(argv) , _baseIntegration(_argc, _argv) { + crl::toggle_fp_exceptions(true); + base::Integration::Set(&_baseIntegration); } diff --git a/Telegram/SourceFiles/core/launcher.h b/Telegram/SourceFiles/core/launcher.h index c97fb732e..366568c80 100644 --- a/Telegram/SourceFiles/core/launcher.h +++ b/Telegram/SourceFiles/core/launcher.h @@ -13,9 +13,7 @@ namespace Core { class Launcher { public: - Launcher( - int argc, - char *argv[]); + Launcher(int argc, char *argv[]); static std::unique_ptr Create(int argc, char *argv[]); diff --git a/Telegram/SourceFiles/media/streaming/media_streaming_file.cpp b/Telegram/SourceFiles/media/streaming/media_streaming_file.cpp index 7e1957a98..92f49e831 100644 --- a/Telegram/SourceFiles/media/streaming/media_streaming_file.cpp +++ b/Telegram/SourceFiles/media/streaming/media_streaming_file.cpp @@ -412,7 +412,9 @@ void File::start(not_null delegate, crl::time position) { _reader->startStreaming(); _context.emplace(delegate, _reader.get()); + _thread = std::thread([=, context = &*_context] { + crl::toggle_fp_exceptions(true); context->start(position); while (!context->finished()) { context->readNextPacket(); diff --git a/Telegram/lib_crl b/Telegram/lib_crl index 3ccf2ed50..9d2242617 160000 --- a/Telegram/lib_crl +++ b/Telegram/lib_crl @@ -1 +1 @@ -Subproject commit 3ccf2ed5095442e5874bba8852cb7dc4efeae29f +Subproject commit 9d2242617c4ebe2664a83521036536b4629be484 diff --git a/cmake b/cmake index 7260711ec..76ece84e7 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 7260711ec54e8c4ef7813f49b93cfa11dfdb9b39 +Subproject commit 76ece84e77c11c2fc4ef36363d94c331d01d4444