disable brush start curve for other than iOS, frames capture for Windows, fix frame dt
This commit is contained in:
@@ -81,6 +81,7 @@ void App::initLog()
|
||||
CHAR path[MAX_PATH];
|
||||
GetCurrentDirectoryA(sizeof(path), path);
|
||||
data_path = path;
|
||||
rec_path = data_path + "\\frames";
|
||||
#endif
|
||||
|
||||
LogRemote::I.start();
|
||||
@@ -440,12 +441,18 @@ void App::rec_start()
|
||||
{
|
||||
if (!rec_running)
|
||||
{
|
||||
#if defined(__IOS__) || defined(__OSX__)
|
||||
NSString* path = [NSString stringWithUTF8String:rec_path.c_str()];
|
||||
NSArray *dirFiles = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:path error:nil];
|
||||
NSArray *jpgFiles = [dirFiles filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"self ENDSWITH '.jpg'"]];
|
||||
rec_count = (int)[jpgFiles count];
|
||||
update_rec_frames();
|
||||
rec_thread = std::thread(&App::rec_loop, this);
|
||||
#else
|
||||
rec_count = Asset::list_files(rec_path, false, ".*\\.jpg").size();
|
||||
update_rec_frames();
|
||||
rec_thread = std::thread(&App::rec_loop, this);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -195,8 +195,10 @@ void ui::Stroke::reset(bool clear_keypoints /*= false*/)
|
||||
}
|
||||
void ui::Stroke::add_point(glm::vec2 pos, float pressure)
|
||||
{
|
||||
#ifdef __IOS__
|
||||
m_curve = glm::min(m_curve + 0.1f, 1.f);
|
||||
pressure = pressure * glm::pow(m_curve, 2.f);
|
||||
#endif // __IOS__
|
||||
|
||||
if (m_brush.m_tip_size_pressure)
|
||||
m_step = glm::max(m_brush.m_tip_spacing * m_brush.m_tip_size * pressure * 800.f, 1.f);
|
||||
|
||||
@@ -413,7 +413,7 @@ int main(int argc, char** argv)
|
||||
App::I.redraw = true;
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||
App::I.clear();
|
||||
App::I.update((float)(t1 - t0) / 1000.0f);
|
||||
App::I.update(dt);
|
||||
SwapBuffers(hDC);
|
||||
async_unlock();
|
||||
//LOG("swap main");
|
||||
@@ -421,7 +421,7 @@ int main(int argc, char** argv)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
App::I.terminate();
|
||||
// Clean up
|
||||
WacomTablet::I.terminate();
|
||||
DestroyWindow(hWnd);
|
||||
|
||||
Reference in New Issue
Block a user