forked from KolibriOS/kolibrios
fix for a f*cking mem
git-svn-id: svn://kolibrios.org@7779 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
3ad0875d89
commit
fbb2253145
@ -97,9 +97,11 @@
|
||||
|
||||
:dword get_menu_click()
|
||||
{
|
||||
dword res = ESDWORD[shared_mem];
|
||||
ESDWORD[shared_mem] = 0;
|
||||
return res;
|
||||
//dword res = ESDWORD[shared_mem];
|
||||
char res[2];
|
||||
ReadFile(0, 2, #res, "/tmp0/1/menu.tmp");
|
||||
//ESDWORD[shared_mem] = 0;
|
||||
return res[0];
|
||||
}
|
||||
|
||||
#endif
|
@ -35,7 +35,7 @@ int GetNextParam()
|
||||
void GetWindowPosition()
|
||||
{
|
||||
int position, rez;
|
||||
shared_mem = memopen(#shared_name, 20, SHM_WRITE);
|
||||
shared_mem = memopen(#shared_name, 20, SHM_READ);
|
||||
win_x = ESDWORD[shared_mem + 4];
|
||||
win_y = ESDWORD[shared_mem + 8];
|
||||
position = ESDWORD[shared_mem + 12];
|
||||
@ -75,17 +75,12 @@ void main()
|
||||
{
|
||||
proc_info Form;
|
||||
|
||||
if (!param)
|
||||
die(
|
||||
"'This is a menu component used in Eolite, WebView, etc...
|
||||
Please forget it if you are not a developer ;)' -I");
|
||||
if (!param) die("'Menu component is for developers only' -I");
|
||||
|
||||
GetMenuItems(#param);
|
||||
max_name_len = strlen(names.get(0)) * 6;
|
||||
max_hotkey_len = strlen(hotkeys.get(0)) * 6;
|
||||
|
||||
//selected = ESDWORD[shared_mem];
|
||||
|
||||
menu1.count = names.count;
|
||||
menu1.SetFont(6, 9, 0x80);
|
||||
menu1.SetSizes(2,2, max_name_len + max_hotkey_len + 23, menu1.count*ITEM_H, ITEM_H);
|
||||
@ -174,12 +169,17 @@ void draw_list()
|
||||
|
||||
void click()
|
||||
{
|
||||
ESDWORD[shared_mem] = menu1.cur_y + 1;
|
||||
char res[2];
|
||||
res[0] = menu1.cur_y + 1;
|
||||
res[1] = '\0';
|
||||
//ESDWORD[shared_mem] = menu1.cur_y + 1;
|
||||
CreateFile(2, #res, "/tmp0/1/menu.tmp");
|
||||
ExitProcess();
|
||||
}
|
||||
|
||||
void exit()
|
||||
{
|
||||
ESDWORD[shared_mem] = 0;
|
||||
//ESDWORD[shared_mem] = 0;
|
||||
CreateFile(2, 0, "/tmp0/1/menu.tmp");
|
||||
ExitProcess();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user