tox iterate interval pow(1.6)
fix faux offline inbetween timer crop by default
This commit is contained in:
parent
3da5872df8
commit
b0173f6d68
@ -5,6 +5,7 @@
|
|||||||
#include <SDL3/SDL.h>
|
#include <SDL3/SDL.h>
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
MainScreen::MainScreen(SDL_Renderer* renderer_, std::string save_path, std::string save_password, std::vector<std::string> plugins) :
|
MainScreen::MainScreen(SDL_Renderer* renderer_, std::string save_path, std::string save_password, std::vector<std::string> plugins) :
|
||||||
renderer(renderer_),
|
renderer(renderer_),
|
||||||
@ -253,7 +254,9 @@ Screen* MainScreen::tick(float time_delta, bool& quit) {
|
|||||||
mts.iterate(); // compute
|
mts.iterate(); // compute
|
||||||
|
|
||||||
_min_tick_interval = std::min<float>(
|
_min_tick_interval = std::min<float>(
|
||||||
tc.toxIterationInterval()/1000.f,
|
// HACK: pow by 1.6 to increase 50 -> ~500 (~522)
|
||||||
|
// and it does not change 1
|
||||||
|
std::pow(tc.toxIterationInterval(), 1.6f)/1000.f,
|
||||||
pm_interval
|
pm_interval
|
||||||
);
|
);
|
||||||
_min_tick_interval = std::min<float>(
|
_min_tick_interval = std::min<float>(
|
||||||
@ -261,6 +264,8 @@ Screen* MainScreen::tick(float time_delta, bool& quit) {
|
|||||||
fo_interval
|
fo_interval
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//std::cout << "MS: min tick interval: " << _min_tick_interval << "\n";
|
||||||
|
|
||||||
switch (_compute_perf_mode) {
|
switch (_compute_perf_mode) {
|
||||||
// normal 1ms lower bound
|
// normal 1ms lower bound
|
||||||
case 0: _min_tick_interval = std::max<float>(_min_tick_interval, 0.001f); break;
|
case 0: _min_tick_interval = std::max<float>(_min_tick_interval, 0.001f); break;
|
||||||
|
@ -32,7 +32,7 @@ struct SendImagePopup {
|
|||||||
Rect crop_rect;
|
Rect crop_rect;
|
||||||
Rect crop_before_drag;
|
Rect crop_before_drag;
|
||||||
|
|
||||||
bool cropping {false};
|
bool cropping {true};
|
||||||
bool dragging_last_frame_ul {false};
|
bool dragging_last_frame_ul {false};
|
||||||
bool dragging_last_frame_lr {false};
|
bool dragging_last_frame_lr {false};
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ class ToxFriendFauxOfflineMessaging : public ToxEventI {
|
|||||||
|
|
||||||
// TODO: increase timer?
|
// TODO: increase timer?
|
||||||
const float _delay_after_cc {4.5f};
|
const float _delay_after_cc {4.5f};
|
||||||
const float _delay_inbetween {1.3f};
|
const float _delay_inbetween {0.3f};
|
||||||
const float _delay_retry {10.f}; // retry sending after 10s
|
const float _delay_retry {10.f}; // retry sending after 10s
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user