Commit 56c72f12 authored by David Košenina's avatar David Košenina

usb open fix, debug view fixed view fonts

parent f5fbb36f
......@@ -25,6 +25,10 @@ OsciloskopDebug::OsciloskopDebug(wxWindow* parent)
Debug(parent)
{
m_Redirect = new wxStreamToTextRedirector(m_textCtrl41);
wxFont font(8, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, "Courier New");
m_textCtrl41->SetFont(font);
}
void OsciloskopDebug::ThermalOnActivate(wxActivateEvent& event)
......
......@@ -4377,7 +4377,7 @@ Info::~Info()
Debug::Debug( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxSize( -1,-1 ), wxSize( -1,-1 ) );
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
wxBoxSizer* bSizer55;
bSizer55 = new wxBoxSizer( wxVERTICAL );
......
......@@ -993,7 +993,7 @@ class Debug : public wxDialog
public:
wxTextCtrl* m_textCtrl41;
Debug( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Debug"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 750,500 ), long style = wxDEFAULT_DIALOG_STYLE );
Debug( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Debug"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 750,750 ), long style = wxDEFAULT_DIALOG_STYLE );
~Debug();
};
......
......@@ -30873,10 +30873,10 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size">500,500</property>
<property name="minimum_size">-1,-1</property>
<property name="name">Debug</property>
<property name="pos"></property>
<property name="size">500,500</property>
<property name="size">750,750</property>
<property name="style">wxDEFAULT_DIALOG_STYLE</property>
<property name="subclass"></property>
<property name="title">Debug</property>
......@@ -163,10 +163,10 @@ ThreadApi::ThreadApi()
void ThreadApi::function(EThreadApiFunction f)
{
SDL_AtomicLock(&lock);
SDL_AtomicAdd(&sync, 1);
func.pushBack(f);
SDL_AtomicUnlock(&lock);
SDL_AtomicSet(&sync, 1);
}
}
void ThreadApi::wait()
{
......@@ -182,18 +182,20 @@ void ThreadApi::update()
// default
int iconnected = 0;
int iopened = 0;
int isimulate = 0;
isimulate = sfIsSimulate(getCtx());
iconnected = sfIsConnected(getCtx());
int iopened = 0;
int isimulate = 0;
isimulate = sfIsSimulate(getCtx());
iconnected = sfIsConnected(getCtx());
iret += sfHardwareIsOpened(getCtx(), &iopened);
SDL_AtomicSet(&connected, iconnected);
SDL_AtomicSet(&simulate, isimulate);
SDL_AtomicSet(&open, iopened);
SDL_AtomicSet(&simulate, isimulate);
SDL_AtomicSet(&open, iopened);
// functions
int decr = 0;
Array<EThreadApiFunction, 22> execute;
SDL_AtomicLock(&lock);
decr = -1*func.getCount();
for(int i=0;i<func.getCount();i++)
execute.pushBack( func[i] );
func.clear();
......@@ -342,8 +344,8 @@ void ThreadApi::update()
break;
};
}
SDL_AtomicSet(&ret, iret);
SDL_AtomicSet(&sync, 0);
SDL_AtomicSet( &ret, iret );
SDL_AtomicAdd( &sync, decr );
}
////////////////////////////////////////////////////////////////////////////////
......@@ -796,7 +798,6 @@ int ThreadApi::captureFrameData(SFrameData* buffer, int toReceive, int* transfer
int ThreadApi::hardwareControlFunction(SHardware1* hw1, SHardware2* hw2)
{
SDL_AtomicSet(&sync, 1);
setConfig1(hw1);
setConfig2(hw2);
int ver = SDL_AtomicGet(&version);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment