Skip to content

Instantly share code, notes, and snippets.

@KVM-Explorer
Last active September 15, 2023 13:23
Show Gist options
  • Save KVM-Explorer/862824ec2f7e05d450146f5152e760bb to your computer and use it in GitHub Desktop.
Save KVM-Explorer/862824ec2f7e05d450146f5152e760bb to your computer and use it in GitHub Desktop.
[左脚踩右脚螺旋升天] TM 引擎 runner line950-line974代码片段 #c #GameEngine
for (uint32_t s = 0, count = 0; s < app->num_splits; s++) {
if (app->activated_gpu_affinity_mask & (1 << s)) {
count++;
}
splits[count] = app->viewer_splits[s + 1];
}
tm_rect_t slider_rect = tm_rect_split_off_bottom(&rect, 20.0, 0.0);
const uint64_t slider_id = tm_ui_api->make_id(app->window.ui);
const tm_ui_slider_t slider = {
.id = slider_id,
.rect = slider_rect,
.min = 0.0,
.max = 1.0,
};
tm_unused(slider);
//TODO: something wrong with DPI. results in a not fatal interaction bug.
ui_multi_slider(app->window.ui, &uistyle, &slider, splits + 1, app->num_splits - 1, NULL, !(app->use_external_scheduler && app->external_scheduler_available));
// if (!(app->use_external_scheduler && app->external_scheduler_available)) {
// }
for (uint32_t s = 0, count = 0; s < app->num_devices; s++) {
if (app->activated_gpu_affinity_mask & (1 << s)) {
count++;
}
app->viewer_splits[s + 1] = splits[count];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment