Topic: [QUESTION] Minimize TW on MAC?
hello,
I jsut want to know if there is any button to press that Teeworlds minimize?
You are not logged in. Please login or register.
Teeworlds Forum → Support → [QUESTION] Minimize TW on MAC?
hello,
I jsut want to know if there is any button to press that Teeworlds minimize?
Actually there was a function like this some time ago and it is reimplemented in the refactor branch, but in teeworlds-0.5.2 it is not available. If you are able to compile teeworlds yourself, here is a patch that adds this command to teeworlds-0.5.2.
Syntax of the command in f1 console:
minimize
You might want to bind it to some key:
bind f11 minimize
Patch:
diff -Nru teeworlds-0.5.2-src/src/engine/client/ec_client.c teeworlds-0.5.2-minimize-src/src/engine/client/ec_client.c
--- teeworlds-0.5.2-src/src/engine/client/ec_client.c 2009-10-26 19:04:31.000000000 +0100
+++ teeworlds-0.5.2-minimize-src/src/engine/client/ec_client.c 2010-01-13 15:20:18.282777000 +0100
@@ -1870,6 +1870,11 @@
client_quit();
}
+static void con_minimize(void *result, void *user_data)
+{
+ gfx_minimize();
+}
+
static void con_ping(void *result, void *user_data)
{
msg_pack_start_system(NETMSG_PING, 0);
@@ -1972,6 +1977,7 @@
static void client_register_commands()
{
+ MACRO_REGISTER_COMMAND("minimize", "", CFGFLAG_CLIENT, con_minimize, 0x0, "Minimize Teeworlds");
MACRO_REGISTER_COMMAND("quit", "", CFGFLAG_CLIENT, con_quit, 0x0, "Quit Teeworlds");
MACRO_REGISTER_COMMAND("exit", "", CFGFLAG_CLIENT, con_quit, 0x0, "Quit Teeworlds");
MACRO_REGISTER_COMMAND("connect", "s", CFGFLAG_CLIENT, con_connect, 0x0, "Connect to the specified host/ip");
How to apply the patch:
1. Copy the patch into a file named minimize.patch somewhere on your computer.
2. Enter the following in a console:
cd /path/to/teeworlds-0.5.2-src/
patch -p1 < /path/to/minimize.patch
This function will work on any OS(including mac), as it is using the minimize feature of the SDL library.
However, if you are not able to compile, the refactoring of teeworlds will probably be done quite soon, thus the problem of the missing minimize command will be solved.
Ahh okey
ehm..I can compile,
but i forgot how to patch xD
Patch -p0 < patch.patch | ? was it like this xD
and have i to put the patch in a txt editor and name it .patch? yes or?
xD -Stripe
hmm i get an error or something
(Stripping trailing CRs from patch.)
can't find file to patch at input line 4
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nru release-0.5.2rc1/src/engine/client/ec_client.c release-0.5.2rc1-minimize/src/engine/client/ec_client.c
|--- release-0.5.2rc1/src/engine/client/ec_client.c 2010-01-12 18:04:10.813458000 +0100
|+++ tw-0.5.1-minimize/src/engine/client/ec_client.c 2010-01-11 16:11:29.442526000 +0100
--------------------------
File to patch:
Skip this patch? [y] y
Skipping patch.
patch unexpectedly ends in middle of line
2 out of 2 hunks ignored
Yes, put the patch in a file named minimize.patch or similar. Then cd to teeworlds-0.0.5-src. Then use:
patch -p1 < /path/to/the/patchfile/minimize.patch
This should do it, at least it does on my pc.
hm now this
***-***-MacBook-Pro:tw ***$ patch -p0 < /Users/***/***/TW/Compile/tw mini.patch
patch: **** read error : Is a directory
*** is my name with 3 ***
Wooho, thanks ghost91 for this snippet, very useful!
Stripe, if you cant apply the patch just do it by hand, those 5 lines are not to much
I can`t Code C++ or C or something else and i dont know where i have to write it
but You can make it for me and send me i skype
That would be so nice *_*
hm...about c++ a question, does someone know where i can learn this...are there a page where a tutorial is for example or is it so complex?
***-***-MacBook-Pro:tw ***$ patch -p0 < /Users/***/***/TW/Compile/tw mini.patch
patch: **** read error : Is a directory
Why are u using a whitespace here? Maybe that's the problem: patch thinks you want to use the directory
/Users/***/***/TW/Compile/tw as patch. And be sure to write p1 and not p0, otherwise it won't work.
You should type that:
patch -p1 < /Users/***/***/TW/Compile/tw/mini.patch
@ELO~281:
http://www.cplusplus.com/doc/tutorial/
You can get the basics there, if you want to learn coding tw, take some time looking to the sourcecode
(btw. this might not be the correct topic for your question)
(btw. this might not be the correct topic for your question)
Sry, i know...but stripe mentioned C++ so i take the situation to ask
I get this error wen I try to apply the patch file:
patching file src/engine/client/ec_client.c
Hunk #1 succeeded at 1870 with fuzz 1.
patch unexpectedly ends in middle of line
patch: **** unexpected end of file in patch
going to try it manually then..
EDIT:
I get the "minimize" up in F1 but wen I do the command nothing happens..
MertenNor
About those patch errors: it might be those accur, because I was using svn version of teeworlds-0.5.2 (/tags/teeworlds-0.5.2rc1)
I edited my first post, so it contains a patch that has been created with the sourcecode of teeworlds that you can get from the download section here.
Also now there is an explanation about how to apply the patch.
@ MertenNor: If you have applied the patch correctly and it still does not work, I have no idea what the problem might be as the code is actually the same as in the refactor branch, only it is written in the old style. Maybe you try it again with the updated patch. You should now be able to patch automatically without any errors. Pls tell me, whether it works correctly then, or not.
I get error like Merten..
can you put the source here please?
(Only this file change, just compile it with the last teeworlds sources)
@ghost91
wen I try the new patch.. I get this error:
patching file src/engine/client/ec_client.c
Hunk #1 succeeded at 1870 with fuzz 1.
patch unexpectedly ends in middle of line
Hunk #2 FAILED at 1977.
1 out of 2 hunks FAILED -- saving rejects to file src/engine/client/ec_client.c.rej
@buffer[]
wen I apply the "ec_client.c" it only minimizes in Window mode and not in fullscreen..
but what about Hide the Teeworlds instead ?
MertenNor
at me it dotn work
i write minimize in console but nothing happens.. Merten can you sent me youres? pls
at me it dotn work
i write minimize in console but nothing happens.. Merten can you sent me youres? pls
here but it only works to minimize it wen it is in Window mode.. xD
MertenNor
buffer[] is right. If it does not work on Mac, it is a problem if the sdl implementation in mac.
Merten..ehmm I cant open it just with text edit.. upload the other teeworlds...
Merten..ehmm I cant open it just with text edit.. upload the other teeworlds...
that is the client file.. put it in side your Teeworlds.app you might want to backup the original file..
MertenNor
Teeworlds Forum → Support → [QUESTION] Minimize TW on MAC?
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 3 official extensions. Copyright © 2003–2009 PunBB.