return head_;\r
}\r
\r
+ bool is_empty() const\r
+ {\r
+ return ax_->IsEmpty();\r
+ }\r
+\r
double fps() const\r
{\r
return ax_->GetFPS(); \r
\r
fps_ = 0;\r
\r
- graph_ = diagnostics::create_graph([this]{return print();});\r
+ graph_ = diagnostics::create_graph(narrow(print()));\r
graph_->set_color("output-buffer-count", diagnostics::color(1.0f, 1.0f, 0.0f)); \r
graph_->set_color("underflow", diagnostics::color(0.6f, 0.3f, 0.9f)); \r
\r
graph_->set_value("output-buffer-count", static_cast<float>(frame_buffer_.size())/static_cast<float>(frame_buffer_.capacity()));\r
\r
auto frame = core::basic_frame::late();\r
- if(!frame_buffer_.try_pop(frame))\r
+ if(!frame_buffer_.try_pop(frame) && context_)\r
graph_->add_tag("underflow");\r
\r
return frame;\r
frame_buffer_.push(frame);\r
}\r
\r
+ if(context_->is_empty())\r
+ {\r
+ context_.reset(nullptr);\r
+ return;\r
+ }\r
+\r
graph_->set_value("output-buffer-count", static_cast<float>(frame_buffer_.size())/static_cast<float>(frame_buffer_.capacity())); \r
- fps_.fetch_and_store(static_cast<int>(context_->fps()*100.0));\r
+ fps_.fetch_and_store(static_cast<int>(context_->fps()*100.0)); \r
+ graph_->update_text(narrow(print()));\r
\r
render(renderer);\r
}\r