mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-22 02:48:28 +00:00
better support for non-send-sync
This commit is contained in:
parent
9b6f6c0fb8
commit
63267ddf56
@ -243,7 +243,7 @@ impl Context {
|
|||||||
platform_name: None,
|
platform_name: None,
|
||||||
renderer_name: None,
|
renderer_name: None,
|
||||||
clipboard_ctx: Box::new(ClipboardContext::dummy().into()),
|
clipboard_ctx: Box::new(ClipboardContext::dummy().into()),
|
||||||
ui: Ui(()),
|
ui: Ui(().into()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fn is_current_context(&self) -> bool {
|
fn is_current_context(&self) -> bool {
|
||||||
@ -329,7 +329,7 @@ impl SuspendedContext {
|
|||||||
platform_name: None,
|
platform_name: None,
|
||||||
renderer_name: None,
|
renderer_name: None,
|
||||||
clipboard_ctx: Box::new(ClipboardContext::dummy().into()),
|
clipboard_ctx: Box::new(ClipboardContext::dummy().into()),
|
||||||
ui: Ui(()),
|
ui: Ui(().into()),
|
||||||
};
|
};
|
||||||
if ctx.is_current_context() {
|
if ctx.is_current_context() {
|
||||||
// Oops, the context was activated -> deactivate
|
// Oops, the context was activated -> deactivate
|
||||||
|
|||||||
@ -118,7 +118,7 @@ impl Context {
|
|||||||
|
|
||||||
/// A temporary reference for building the user interface for one frame
|
/// A temporary reference for building the user interface for one frame
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Ui(pub(crate) ());
|
pub struct Ui(pub(crate) cell::UnsafeCell<()>);
|
||||||
|
|
||||||
/// This is our internal buffer that we use for the Ui object.
|
/// This is our internal buffer that we use for the Ui object.
|
||||||
///
|
///
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user