use standard api where possible, small cleanups
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13065 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -33,7 +33,6 @@
|
|||||||
#define WS_DISPLAY_UTILS 0x00000ef9
|
#define WS_DISPLAY_UTILS 0x00000ef9
|
||||||
#define WS_SET_LOCK_STATE 0x00000efb
|
#define WS_SET_LOCK_STATE 0x00000efb
|
||||||
#define WS_SET_DISPLAY_MODE 0x00000efd
|
#define WS_SET_DISPLAY_MODE 0x00000efd
|
||||||
#define WS_SWITCH_WORKSPACE 0x00000f26
|
|
||||||
#define WS_SET_PALETTE 0x00000f27
|
#define WS_SET_PALETTE 0x00000f27
|
||||||
|
|
||||||
|
|
||||||
@@ -329,14 +328,8 @@ BWindowScreen::~BWindowScreen()
|
|||||||
delete_sem(activate_sem);
|
delete_sem(activate_sem);
|
||||||
delete_sem(debug_sem);
|
delete_sem(debug_sem);
|
||||||
|
|
||||||
if (debug_state) {
|
if (debug_state)
|
||||||
#ifdef COMPILE_FOR_R5
|
activate_workspace(debug_workspace);
|
||||||
_BAppServerLink_ link;
|
|
||||||
link.fSession->swrite_l(WS_SWITCH_WORKSPACE);
|
|
||||||
link.fSession->swrite_l(debug_workspace);
|
|
||||||
link.fSession->sync();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
free(new_space);
|
free(new_space);
|
||||||
free(old_space);
|
free(old_space);
|
||||||
@@ -653,13 +646,8 @@ BWindowScreen::Suspend(char *label)
|
|||||||
if (IsLocked())
|
if (IsLocked())
|
||||||
Unlock();
|
Unlock();
|
||||||
|
|
||||||
// Switch to debug workspace
|
activate_workspace(debug_workspace);
|
||||||
#ifdef COMPILE_FOR_R5
|
|
||||||
_BAppServerLink_ link;
|
|
||||||
link.fSession->swrite_l(WS_SWITCH_WORKSPACE);
|
|
||||||
link.fSession->swrite_l(debug_workspace);
|
|
||||||
link.fSession->sync();
|
|
||||||
#endif
|
|
||||||
// Suspend ourself
|
// Suspend ourself
|
||||||
suspend_thread(find_thread(NULL));
|
suspend_thread(find_thread(NULL));
|
||||||
|
|
||||||
@@ -894,16 +882,13 @@ void
|
|||||||
BWindowScreen::GetCardInfo()
|
BWindowScreen::GetCardInfo()
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
BScreen screen(this);
|
BScreen screen(this);
|
||||||
frame_buffer_config config;
|
|
||||||
|
|
||||||
display_mode mode;
|
display_mode mode;
|
||||||
|
if (screen.GetMode(&mode) < B_OK)
|
||||||
|
return;
|
||||||
|
|
||||||
uint32 bits_per_pixel;
|
uint32 bits_per_pixel;
|
||||||
|
|
||||||
card_info.version = 2;
|
|
||||||
card_info.id = 0;
|
|
||||||
screen.GetMode(&mode);
|
|
||||||
|
|
||||||
switch(mode.space & 0x0fff) {
|
switch(mode.space & 0x0fff) {
|
||||||
case B_CMAP8:
|
case B_CMAP8:
|
||||||
bits_per_pixel = 8;
|
bits_per_pixel = 8;
|
||||||
@@ -919,6 +904,8 @@ BWindowScreen::GetCardInfo()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
card_info.version = 2;
|
||||||
|
card_info.id = 0;
|
||||||
card_info.bits_per_pixel = bits_per_pixel;
|
card_info.bits_per_pixel = bits_per_pixel;
|
||||||
card_info.width = mode.virtual_width;
|
card_info.width = mode.virtual_width;
|
||||||
card_info.height = mode.virtual_height;
|
card_info.height = mode.virtual_height;
|
||||||
@@ -939,6 +926,8 @@ BWindowScreen::GetCardInfo()
|
|||||||
|
|
||||||
status_t result = B_ERROR;
|
status_t result = B_ERROR;
|
||||||
|
|
||||||
|
frame_buffer_config config;
|
||||||
|
|
||||||
#ifdef COMPILE_FOR_R5
|
#ifdef COMPILE_FOR_R5
|
||||||
_BAppServerLink_ link;
|
_BAppServerLink_ link;
|
||||||
link.fSession->swrite_l(WS_GET_FRAMEBUFFER);
|
link.fSession->swrite_l(WS_GET_FRAMEBUFFER);
|
||||||
@@ -1100,7 +1089,6 @@ BWindowScreen::InitClone()
|
|||||||
addon_image = -1;
|
addon_image = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
CALLED();
|
|
||||||
return result;
|
return result;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user